一.本地定时通知的步骤
1.引入头文件和代理协议
#import <UserNotifications/UserNotifications.h>
@interface KSHomePageViewController ()<UNUserNotificationCenterDelegate>
2.注册通知
//注册通知
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
center.delegate = self;
3.请求获取通知权限(角标,弹窗,声音)
//请求获取通知权限(角标,弹窗,声音)
[center requestAuthorizationWithOptions:(UNAuthorizationOptionBadge | UNAuthorizationOptionAlert | UNAuthorizationOptionSound) completionHandler:^(BOOL granted,NSError * _Nullable error){
//获取用户是否同意开启通知
if(granted){
NSLog(@"获取授权成功"</