File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,16 +147,36 @@ <h2>Objective-C example</h2>
147147That spans two lines
148148*/
149149
150- #import < Test /Test.h>
150+ #import "MyClass.h"
151+ #import < AFramework /AFrameork.h>
152+ @import BFrameworkModule;
153+
154+ NS_ENUM(SomeValues) {
155+ aValue = 1;
156+ };
157+
158+ // A Class Extension with some properties
159+ @interface MyClass ()< AProtocol >
160+ @property(atomic, readwrite, assign) NSInteger anInt;
161+ @property(nonatomic, strong, nullable) NSString *aString;
162+ @end
163+
151164@implementation YourAppDelegate
152165
153- // This is a one-line comment
166+ - (instancetype)initWithString:(NSString *)aStringVar {
167+ if ((self = [super init])) {
168+ aString = aStringVar;
169+ }
170+ return self;
171+ }
154172
155- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
156- char myString[] = "This is a C character array ";
157- int test = 5 ;
158- return YES;
173+ - (BOOL)doSomething:(float)progress {
174+ NSString * myString = @ "This is a ObjC string %f ";
175+ myString = [[NSString stringWithFormat:myString, progress] stringByAppendingString:self.aString] ;
176+ return myString.length > 100 ? NO : YES;
159177}
178+
179+ @end
160180</ textarea > </ div >
161181
162182< h2 > Java example</ h2 >
You can’t perform that action at this time.
0 commit comments