-firstObject
@interface NSArray (addition) | |
-(id) firstObject; | |
@end |
@implementation NSArray (addition) | |
-(id) firstObject | |
{ | |
return [self count]?[self objectAtIndex:0]:nil; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment