本地通知:
UILocalNotification*notification = [[UILocalNotification alloc] init];
if (nil != notification)
{
// 设置弹出通知的时间
NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"HH:mm"];
NSDate *nowDate = [dateFormatter dateFromString:@"09:54"];
//设置通知弹出的时间
notification.fireDate = nowDate;
//设置重复重复间隔为每天
notification.repeatInterval = kCFCalendarUnitDay;
// 设置时区
notification.timeZone= [NSTimeZone defaultTimeZone];
//设置提示消息
notification.alertBody = [NSString stringWithFormat:@"%@",@"通知来了"];
// 设置启动通知的声音
notification.soundName = UILocalNotificationDefaultSoundName;
// 启动通知
[[UIApplication sharedApplication]scheduleLocalNotification:notification];
}