Created
September 2, 2012 03:48
-
-
Save nonopolarity/3594678 to your computer and use it in GitHub Desktop.
Objective-C 2.0 for ... in loop, using Fast Enumeration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSArray *array = @[ | |
@"hello", | |
@"world", | |
[NSNull null], | |
[NSNumber numberWithInt:123], | |
[NSNumber numberWithFloat:123.456] | |
]; | |
for (id obj in array) { | |
NSLog(@"the obj is %@", obj); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment