Created
December 19, 2011 03:40
-
-
Save samvermette/1495276 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@interface Class () | |
@property (nonatomic, readonly) NSDateFormatter *dateFormatter; | |
@end | |
@implementation Class | |
@synthesize dateFormatter; | |
- (NSDateFormatter*)dateFormatter { | |
if(dateFormatter == nil) | |
dateFormatter = [[NSDateFormatter alloc] init]; | |
return dateFormatter; | |
} | |
- (void)someMethod { | |
NSDate *date [self.dateFormatter dateFromString:someString]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment