Skip to content

Commit

Permalink
Correcting Misspelled Words
Browse files Browse the repository at this point in the history
  • Loading branch information
bang590 committed May 25, 2015
1 parent 244f3a3 commit 116175a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README-CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
JSPatch(中文) ![License MIT](https://go-shields.herokuapp.com/license-MIT-yellow.png)
========
JSPatch可以让你用javascript书写原生iOS APP。只需在项目引入极小的引擎,就可以使用javascript调用任何Object-c的原生接口,获得脚本语言的优势:为项目动态添加模块,或替换项目原生代码动态修复bug。
JSPatch可以让你用JavaScript书写原生iOS APP。只需在项目引入极小的引擎,就可以使用JavaScript调用任何Objective-C的原生接口,获得脚本语言的优势:为项目动态添加模块,或替换项目原生代码动态修复bug。

项目仍在开发中,欢迎一起完善这个项目。

Expand Down Expand Up @@ -122,7 +122,7 @@ var indexPath = NSIndexPath.indexPathForRow_inSection(0, 1);
```

####3. defineClass
可以新定义一个Object-c class,重写父类里的方法。
可以新定义一个Objective-C class,重写父类里的方法。

```js
defineClass("JPViewController: UIViewController", {
Expand All @@ -145,7 +145,7 @@ defineClass("JPViewController: UIViewController", {
})
```

可以定义Object-c里已存在的类,对类和实例方法进行动态替换。
可以定义Objective-C里已存在的类,对类和实例方法进行动态替换。

```objc
//OC
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
JSPatch ![License MIT](https://go-shields.herokuapp.com/license-MIT-yellow.png)
========

JSPatch bridge Object-C and Javascript using the Object-C runtime. You can call any Object-C class and method in JavaScript by just including a small engine. That makes the APP obtain the power of script language: add modules or replacing Object-C codes to fix bugs dynamically.
JSPatch bridge Objective-C and JavaScript using the Objective-C runtime. You can call any Objective-C class and method in JavaScript by just including a small engine. That makes the APP obtain the power of script language: add modules or replacing Objective-C codes to fix bugs dynamically.

JSPatch is still in development, welcome to improve the project together.

Expand Down Expand Up @@ -57,7 +57,7 @@ Copy `JSEngine.m` `JSEngine.h` `JSPatch.js` in `JSPatch/` to your project.

##Usage

###Object-C
###Objective-C
1. `#import "JPEngine.h"`
2. call `[JPEngine startEngine]`
3. exec JavasScript by `[JPEngine evaluateScript:@""]`
Expand Down Expand Up @@ -90,7 +90,7 @@ NSString *script = [NSString stringWithContentsOfFile:sourcePath encoding:NSUTF8

####1. require

Call `require('className')` before using the Object-C class. You can use `,` to separate multiple class to import them at one time.
Call `require('className')` before using the Objective-C class. You can use `,` to separate multiple class to import them at one time.

```js
require('UIView, UIColor')
Expand Down Expand Up @@ -123,7 +123,7 @@ var indexPath = NSIndexPath.indexPathForRow_inSection(0, 1);
```

####3. defineClass
You can define a new Object-C class in JavaScript:
You can define a new Objective-C class in JavaScript:

```js
defineClass("JPViewController: UIViewController", {
Expand Down

0 comments on commit 116175a

Please sign in to comment.