Skip to content

Instantly share code, notes, and snippets.

@pgdaniel
Created July 23, 2014 03:01
Show Gist options
  • Select an option

  • Save pgdaniel/95946a3d0e5bc07d6888 to your computer and use it in GitHub Desktop.

Select an option

Save pgdaniel/95946a3d0e5bc07d6888 to your computer and use it in GitHub Desktop.
random possessions objc
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject:@"One"];
[items addObject:@"Two"];
[items addObject:@"Three"];
[items addObject:@"Four"];
[items addObject:@"Five"];
[items insertObject:@"Zero" atIndex:0];
for (int i = 0; i < [items count]; i++) {
NSLog(@"%@", [items objectAtIndex:i]);
}
items = nil;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment