我已经看到一些闹钟应用程序(例如 Rise)在 iPhone 锁定屏幕中显示“滑动以暂停”消息,而通常显示的是“滑动以解锁”。该应用程序在前台,但屏幕被锁定。这是怎么做到的?我在 Stackoverflow 上找不到任何提及它的地方。
最佳答案
在UILocalNotification documentation您将看到名为 alertAction
的 UILocalNotification
属性。该属性描述如下:
The alert action is the title of the right button of the alert or the value of the unlock slider, where the value replaces “unlock” in “slide to unlock”.
因此,如果您想要自定义“滑动解锁”文本,alertAction
是要更改的属性。
关于iphone - 锁定屏幕上的 "Slide to snooze",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16360457/