This shows you the differences between two versions of the page.
objective-c:foundation.framework:nsarray.h:initwithobjects [2012/12/20 12:24] 127.0.0.1 external edit |
objective-c:foundation.framework:nsarray.h:initwithobjects [2024/02/16 01:12] (current) |
||
---|---|---|---|
Line 20: | Line 20: | ||
<code objc> | <code objc> | ||
- | // ** Init some objects | + | // ** Init some objects ** |
NSNumber *number = [NSNumber numberWithInt:1]; | NSNumber *number = [NSNumber numberWithInt:1]; | ||
NSString *string = @"2. Object"; | NSString *string = @"2. Object"; | ||
- | // ** Init array | + | // ** Init array ** |
NSArray *myArray = [[NSArray alloc]initWithObjects:number, string, @"3. Object", nil]; | NSArray *myArray = [[NSArray alloc]initWithObjects:number, string, @"3. Object", nil]; | ||
- | // ** Output array | + | // ** Output array ** |
NSLog(@"myArray: %@", myArray); | NSLog(@"myArray: %@", myArray); | ||