gpt4 book ai didi

ios - 有没有办法在应用程序处于前台时显示本地通知

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:16:54 24 4
gpt4 key购买 nike

我知道当应用程序在前台时处理本地通知的标准方法:

  • 接收申请:didReceiveRemoteNotification:
  • 在其中显示一个 UIAlertView(或任何其他 UI)

我的问题是,当应用程序处于前台时,是否有可能(甚至使用私有(private) api)在状态栏区域显示通知消息。

最佳答案

据我所知没有。

我的建议

最好的选择是,您需要在应用程序顶部添加一个横幅以显示 UILocalNotification 的效果。这比依赖私有(private) API(如果有的话)要好。

关于ios - 有没有办法在应用程序处于前台时显示本地通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14144289/

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