简体   繁体   English

在iPhone锁定屏幕上显示CFUserNotification

[英]Display CFUserNotification on iPhone lock screen

I am developing an iPhone app that need to display some message on lock screen. 我正在开发一个iPhone应用程序,该应用程序需要在锁定屏幕上显示一些消息。 I have tried to use local notification or CFUserNotification but neither of them can display the message on top of the lock screen. 我尝试使用本地通知或CFUserNotification,但是它们都不能在锁定屏幕顶部显示该消息。 For CFUserNotification I have tried kCFUserNotificationAlertTopMostKey (refer this similar question ) but it still not work. 对于CFUserNotification,我尝试了kCFUserNotificationAlertTopMostKey(请参阅类似问题 ),但仍然无法正常工作。 I am not going to hook springboard since my phone is not jailbreak. 我的电话不是越狱,所以我不会挂跳板。 I have found an app do implement it and I have tested on my none-jailbreak iPhone iOS 6.0, don't know how to implement this. 我发现有一个应用程序可以实现它,并且已经在我的非越狱iPhone iOS 6.0上进行了测试,但不知道如何实现。

Any help much appreciated. 任何帮助,不胜感激。

[dict setObject:[NSNumber numberWithBool:YES] forKey:(NSString *)kCFUserNotificationAlertTopMostKey];

确实有效

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM