以编程方式检测 ios 中的蓝色闪烁状态栏

Detect Blue flashing status bar in ios programmatically

当 google 地图正在使用位置服务时,我们转到后台,然后出现一个带有蓝色闪烁背景的状态栏,其中包含信息 "Google map is using your location"。

现在,当我打开我的应用程序(或任何其他应用程序)时,您总是会看到蓝色闪烁条。

我的问题是,我能否通过编程方式检测状态栏是否正在闪烁蓝色信息?

UIApplicationDelegate 有这两个方法

- (void)application:(UIApplication *)application willChangeStatusBarFrame:(CGRect)newStatusBarFrame;   // in screen coordinates
- (void)application:(UIApplication *)application didChangeStatusBarFrame:(CGRect)oldStatusBarFrame;

您可以参考此link了解更多详情。

Detecting if user has in call / Any Activity status bar

希望对您有所帮助。
谢谢。