Created
September 9, 2011 11:23
-
-
Save sshrpe/1205980 to your computer and use it in GitHub Desktop.
@CaptainRedmuff's Extensions to 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
// Created by Stuart Sharpe on 09/09/2011. | |
#import "NSArray+CaptainRedmuffExtensions.h" | |
@implementation NSArray (CaptainRedmuffExtensions) | |
- (id)firstObject; | |
{ | |
if (![self count]) { | |
return nil; | |
} | |
return [self objectAtIndex:0]; | |
} | |
@end |
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
// Created by Stuart Sharpe on 09/09/2011. | |
#import <Foundation/Foundation.h> | |
@interface NSArray (CaptainRedmuffExtensions) | |
- (id)firstObject; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment