gpt4 book ai didi

ios 将锁屏通知类型表单横幅更改为警报类型

转载 作者:可可西里 更新时间:2023-11-01 06:05:57 25 4
gpt4 key购买 nike

在我的一个项目中,我想更改显示为横幅的锁屏推送通知,但我想将其更改为警报类型通知,当手机未锁定时警报类型通知工作正常但当手机锁定且推送到达时我想要在手机锁定屏幕上显示与手机锁定前相同的警报。在其中一个应用程序中,它在手机锁定时显示推送警报。这是屏幕截图

enter image description here

当应用程序收到推送通知并且手机被锁定时,我想在我的应用程序中显示相同的警报。提前致谢..

最佳答案

您不能通过编程更改默认的通知警报样式。

您可以在 iPhone 或 iPad 上设置

  1. 从 iPhone 主屏幕打开“设置”应用。
  2. 点击“通知”设置面板。
  3. 点按您要为其配置提醒样式的应用的名称。
  4. 选择弹出式提醒、横幅提醒或无提醒。

您可以查看答案以获得更多帮助:iOS PUSH notification type options? Alert vs Banner?

查看更多答案:How to change notification type from Banner to Alert in iOS8?

I don't believe there is any way to programmatically force the system to display your notification as an alert rather than as a banner. Looking over the documentation for UILocalNotification and for UIUserNotificationSettings, I don't see anything that would allow you to specify that you want an alert instead of a banner.

It's up to the user to adjust their notification settings for your app - I would leave it to them to decide how they want to receive notifications.

关于ios 将锁屏通知类型表单横幅更改为警报类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30527956/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com