Skip to content

Instantly share code, notes, and snippets.

@nonopolarity
nonopolarity / loop.m
Created September 2, 2012 03:48
Objective-C 2.0 for ... in loop, using Fast Enumeration
NSArray *array = @[
@"hello",
@"world",
[NSNull null],
[NSNumber numberWithInt:123],
[NSNumber numberWithFloat:123.456]
];
for (id obj in array) {
NSLog(@"the obj is %@", obj);