Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (19 sloc) 414 Bytes
//
// NSArray+Utilities.m
// UAGithubEngine
//
// Created by Owain Hunt on 27/07/2010.
// Copyright 2010 Owain R Hunt. All rights reserved.
//
// Credit: http://troybrant.net/blog/2010/02/adding-firstobject-to-nsarray/
#import "NSArray+Utilities.h"
@implementation NSArray (Utilities)
- (id)firstObject
{
if ([self count] > 0)
{
return [self objectAtIndex:0];
}
return nil;
}
@end