I've made a LocalNotification app and all is working fine, after setting up the fireDate for dateComponents, however, when i pub the, tableview like this :
NSArray *reminderArray = [[UIApplication sharedApplication] scheduledLocalNotifications]开发者_Python百科;
UILocalNotification *notif = [reminderArray objectAtIndex:indexPath.row];
[cell.textLabel setText:notif.alertBody];
[cell.detailTextLabel setText:[notif.fireDate description ]];
the detailtextlabel is 1 hour earlier the the time picked, i cant find the problem, the reminder fires at the right time.
hope u can help me out ....
Thanks Skov
Don't use [notif.fireDate description]
to display a date in the UI. Apple may change the format how NSDate
describes itself at any time. Currently, it displays itself in GMT but not even that is certain.
Use an NSDateFormatter
to display a date on screen.
精彩评论