無意中安裝了釘釘,發(fā)現(xiàn)現(xiàn)在把提示的通知關閉后,進入首頁會彈出來一個手動打開通知的辦法,感覺以后也可能會遇見,分享大家下,先看一下釘釘?shù)捻撁妗?/p>

先看一下代碼
if ([[UIApplication sharedApplication] currentUserNotificationSettings].types? == UIUserNotificationTypeNone){// 判斷通知是否打開
}
跳轉方法
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"你現(xiàn)在無法收到新消息通知,請到系統(tǒng)“設置”-“通知”-“QQ“中開啟"? preferredStyle:UIAlertControllerStyleAlert];
[alertController addAction:[UIAlertAction actionWithTitle:@"確定" style:UIAlertActionStyleDefault? handler:^(UIAlertAction *action)
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
}]];
[alertController addAction:[UIAlertAction actionWithTitle:@"不再提示" style:UIAlertActionStyleCancel? handler:^(UIAlertAction *action)
{
}]];
[self presentViewController:alertController animated:YES completion:^{
}];
希望大家能用上。。。