Simple countdown and simple countdown
-(Void) viewDidLoad {
[Super viewDidLoad];
[NSTimer scheduledTimerWithTimeInterval: 1.0 target: self selector: @ selector (timerMethod :) userInfo: nil repeats: YES];
}
-(Void) timerMethod :( NSTimer *) timer
{
// Create a NSCalendar object
NSCalendar * calendar = [NSCalendar currentCalendar];
NSDateComponents * Boom = [[NSDateComponents alloc] init];
Boom. year = 2015;
Boom. month = 7;
Boom. day = 8;
Boom. hour = 13;
Boom. minute = 59;
Boom. second = 30;
// Load the target time into date
NSDate * date = [calendar dateFromComponents: Boom];
// Obtain the current time
NSDate * currentDate = [NSDate date];
// Get the specific time difference
Unsigned int flags = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond;
NSDateComponents * rub = [cal components: flags fromDate: currentDate toDate: date options: 0];
_ Boom. text = [NSString stringWithFormat :@"