IOS - 将消息添加到状态栏

标签 ios core-location statusbar

当我使用地理位置时如何向状态栏添加消息。如下图所示

enter image description here

最佳答案

正如 @Quentin Hayot 所描述的 here

This banner is displayed by iOS itself in the following situations:

  • A background app is tracking your position (after a startUpdatingLocation)
  • A background app is using your microphone
  • A background app is performing a VOIP call

The banner color changes with the reason. There is no way to force iOS to display those banners but by using one of the relevant background modes.

如果您的应用没有tracking position, using microphone或执行VOIP call ,您将无法显示该栏。

关于IOS - 将消息添加到状态栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41998312/

相关文章:

ios - NSDate 比较总是返回 NSOrderedSame

ios - 比较数组列表和选定值并根据索引将其显示在表格 View 单元格中

ios - 如何在没有互联网连接的情况下获取经纬度

iphone - 通话中状态栏如何影响 ViewController View 大小?

Android 完全透明的状态栏?

java - 如何在 JTextPane 中编写状态栏?

ios - 使用 pod 文件的 Firebase 实现并在 Objective-C 中找不到符号错误

ios - 如何使用 NSColor?它属于哪里?如何引用呢?

ios - 位置权限问题 iOS 11 和 iOS 10

objective-c - NSSortDescriptor - 按位置排序