【问题标题】:how to set the default to NSUserNotificationAlertStyle the Alerts notification如何将 Alerts 通知的默认设置为 NSUserNotificationAlertStyle
【发布时间】:2014-03-03 08:46:02
【问题描述】:

我是 iOS 新手。 我正在使用的应用程序在通知中心下的设置中具有默认设置为横幅的警报样式。 我想将其更改为警报。我怎样才能做到这一点? 在谷歌上进行一些搜索后,我发现这应该使用 NSUserNotificationAlertStyle 从 Info.plist 更改。

我需要一些帮助。我不知道如何设置。谢谢

【问题讨论】:

    标签: ios uilocalnotification nsusernotification nsusernotificationcenter


    【解决方案1】:

    该变量仅在 OSX 应用程序上有效,在 iOS 应用程序上无效。

    在 iOS 上,通知的样式是在手机的设置中设置的,因此用户可以决定他想要的所有应用程序的样式。

    无法在 iOS 上更改应用内的样式并且仅针对该应用。

    点击此处确认:

    https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html

    【讨论】:

    • 我明白了。谢谢。这个关于ios通知样式的主题有链接吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-31
    • 2020-08-26
    相关资源
    最近更新 更多