If you're not familiar with objective-c, NSDate is the equivalent of the DateTime object in C#. However working with it is quite different. In this article i'll show you how to do some common tasks with the NSDate object. Get Today's Date: NSDate* date = [NSDate date]; Create a Date From Scratch: NSDateComponents* comps = [[NSDateComponents alloc]init]; comps.year = 2014; comps.month = 3; comps.day = 31; NSCalendar* calendar = [NSCalendar currentCalendar]; NSDate* date = [calendar dateFromComponents...(read more)
↧