开发者

How to set a UILocatNotification to fire everyday at 9 am

开发者 https://www.devze.com 2023-03-07 04:44 出处:网络
I need to set a UILocatNotification to fire everyday at 开发者_开发技巧9 am. Any help would be appreciated.[formatter setDateFormat:[NSDateFormatter dateFormatFromTemplate:@\"yyyy-MM-dd HH:mm:ss\"

I need to set a UILocatNotification to fire everyday at 开发者_开发技巧9 am. Any help would be appreciated.


[formatter setDateFormat:[NSDateFormatter dateFormatFromTemplate:@"yyyy-MM-dd HH:mm:ss" 
                                                         options:0
                                                          locale:nil]];
[formatter setTimeZone:[NSTimeZone localTimeZone]];

notification.fireDate = [formatter dateFromString:@"2010-10-21 09:00:00"];
notification.repeatInterval = NSDayCalendarUnit;
0

精彩评论

暂无评论...
验证码 换一张
取 消