Created
March 19, 2013 01:17
-
-
Save alanzeino/5192754 to your computer and use it in GitHub Desktop.
firstObject category for NSArray
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
@implementation NSArray (YOLO) | |
- (id)firstObject | |
{ | |
if (self.count) | |
return [self objectAtIndex:0]; | |
return nil; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment