如何将默认设置设置为NSUserNotificationAlertStyle警报通知(how to set the default to NSUserNotificationAlertStyle th

编程入门 行业动态 更新时间:2024-10-22 08:21:56
如何将默认设置设置为NSUserNotificationAlertStyle警报通知(how to set the default to NSUserNotificationAlertStyle the Alerts notification)

我是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

更多推荐

本文发布于:2023-08-04 15:26:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1417676.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:警报   设置为   如何将   默认设置   通知

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!