I wanted to get random numbers according to time. How do you get the current time in iOS Programming for the iPhone?
NSDate *now = [[NSDate alloc] init]; OR NSDate *now = [NSDate date]; an NSDate object by default will be initialised to the current date.
NSDate *now = [[NSDate alloc] init];
NSDate *now = [NSDate date];
2.1m questions
2.1m answers
60 comments
56.9k users