iOS8 通知設置


無意中安裝了釘釘,發(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:^{

}];

希望大家能用上。。。

最后編輯于
?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容