We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69ecc41 commit d258d7bCopy full SHA for d258d7b
1 file changed
README.md
@@ -8,6 +8,24 @@ JavaScriptBridge provides the way to write iOS apps with JavaScript.
8
9
## Usage
10
11
+```objc
12
+// Retrieve the prepared context
13
+JSContext *context = [JSBScriptingSupport globalContext];
14
+
15
+// Add framework support if needed.
16
+// ('Foundation', 'UIKit', 'QuartzCore' enabled by default.)
17
+[context addScriptingSupport:@"MapKit"];
18
+[context addScriptingSupport:@"MessageUI"];
19
20
+// Evaluate script
21
+[context evaluateScript:
22
+ @"var window = UIWindow.new();"
23
+ @"window.frame = UIScreen.mainScreen().bounds;"
24
+ @"window.backgroundColor = UIColor.whiteColor();"
25
+ @"window.makeKeyAndVisible();"
26
+];
27
+```
28
29
### Naming conventions
30
31
**Class name**
0 commit comments