我是iOS新手。 我正在处理的应用程序在“通知中心”下的“设置”中,默认情况下将“警报”样式设置为“横幅”。 我想将其更改为警报。 我怎样才能做到这一点? 在谷歌搜索后,我发现应该使用NSUserNotificationAlertStyle从Info.plist更改。
我需要一些帮助。 我不知道如何设置它。 谢谢
I am new to iOS. The app I am working on has in Settings under Notification Center the Alert style set by default to Banners. I would like to change that to Alerts. How can I do that? After doing some search on google i found that this should be changed from Info.plist using NSUserNotificationAlertStyle.
I need some help. I don t know how to set this. Thank you
最满意答案
该变量仅在OSX应用程序上有效,而不在iOS应用程序上有效。
在iOS上,通知的样式设置在手机的设置上,因此用户决定他想要的所有应用程序的样式。
在iOS上无法更改应用内的样式以及仅适用于该应用。
点击此处查看确认:
https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html
That variable is only valid on OSX Apps, not on iOS Apps.
On iOS, the style of the notification is set on the settings of the phone, so the user decides what style he wants for all apps.
Is not possible on iOS to change the style within the app and for just that app.
Check here for confirmation:
https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html
更多推荐
发布评论