無意中安裝了釘釘,發現現在把提示的通知關閉后,進入首頁會彈出來一個手動打開通知的辦法,感覺以后也可能會遇見,分享大家下,先看一下釘釘的頁面。
先看一下代碼
if ([[UIApplication sharedApplication] currentUserNotificationSettings].types? == UIUserNotificationTypeNone){// 判斷通知是否打開
}
跳轉方法
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"你現在無法收到新消息通知,請到系統“設置”-“通知”-“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:^{
}];
希望大家能用上。。。