File tree Expand file tree Collapse file tree 1 file changed +0
-7
lines changed
Expand file tree Collapse file tree 1 file changed +0
-7
lines changed Original file line number Diff line number Diff line change @@ -35,12 +35,10 @@ JSContext *context = [JSBScriptingSupport globalContext];
3535** Variable declaration**
3636- Get rid of ` Type ` instead use ` var `
3737
38- * Objective-C*
3938``` objc
4039UILabel *label;
4140```
4241
43- * JavaScript*
4442``` javascript
4543var label;
4644```
@@ -57,7 +55,6 @@ slider.continuous = YES;
5755slider.value = 50.0;
5856```
5957
60- *JavaScript*
6158```javascript
6259var slider = UISlider.alloc().initWithFrame(frame);
6360slider.backgroundColor = UIColor.clearColor();
@@ -72,20 +69,17 @@ slider.value = 50.0;
7269- All colons are removed from the selector
7370- Any lowercase letter that had followed a colon will be capitalized
7471
75- * Objective-C*
7672``` objc
7773UIWindow *window = [[UIWindow alloc ] initWithFrame: [[ UIScreen mainScreen] bounds]] ;
7874```
7975
80- *JavaScript*
8176```javascript
8277var window = UIWindow.alloc().initWithFrame(UIScreen.mainScreen().bounds);
8378```
8479
8580** Struct (CGRect, NSRange, etc.)**
8681- Use Hashes
8782
88- * Objective-C*
8983``` objc
9084UIView *view = [UIView new ];
9185view.frame = CGRectMake(20 , 80 , 280 , 80 );
@@ -94,7 +88,6 @@ CGFloat x = view.frame.origin.x;
9488CGFloat width = view.frame.size.width;
9589```
9690
97- * JavaScript*
9891``` javascript
9992var view = UIView .new ();
10093view .frame = {x: 20 , y: 80 , width: 280 , height: 80 };
You can’t perform that action at this time.
0 commit comments