Friday, April 4, 2014

iOS: Setting a specific NSDate

NSDateComponents *comps = [[[NSDateComponents alloc] init] autorelease];
[comps setDay:10];
[comps setMonth:10];
[comps setYear:2010];
self.timestamp = [[NSCalendar currentCalendar] dateFromComponents:comps];


http://stackoverflow.com/questions/2579738/iphone-os-how-do-i-create-an-nsdate-for-a-specific-date

No comments:

Post a Comment