简体   繁体   English

更改iOS锁屏的行为

[英]Changing the behavior of the iOS Lockscreen

Is there a way to change the behavior of the iOS Lockscreen? 有没有办法更改iOS锁屏的行为? For instance, can an app, if active, provide a user with dynamic content, such as pictures, as the phone's background, and, in addition, allow a user to swipe left (in addition to swiping right, if they want to unlock the phone) to engage said content? 例如,如果某个应用程序处于活动状态,它是否可以向用户提供动态内容(例如图片)作为手机的背景,并允许用户向左滑动(除了向右滑动外,如果他们想解锁手机,电话)从事所说的内容?

Is there a way to change the behavior of the iOS Lockscreen? 有没有办法更改iOS锁屏的行为?

No. 没有。

For instance, can an app, if active... 例如,如果一个应用程序处于活动状态,是否可以...

No. 没有。

iOS doesn't provide any API that would allow the sort of thing that you describe. iOS没有提供任何API来允许您描述的事物。 It might be possible to modify or replace the lock screen if you jailbreak your phone -- all bets are off at that point. 如果您越狱了手机,则可能可以修改或替换锁定屏幕-届时所有赌注都将关闭。 But an app that uses the Apple-provided API has no way to modify the lock screen. 但是,使用Apple提供的API的应用程序无法修改锁定屏幕。

Also, note that if the device is locked, your app won't be active . 另外,请注意,如果设备已锁定,则您的应用将不会处于活动状态 You may have intended a looser definition of "active," but looking at the linked chart of app states will help you understand that what you're looking to do isn't achievable with the current API. 您可能原本打算对“活动”进行更宽松的定义,但是查看应用程序状态的链接表将帮助您了解当前的API无法实现您想要做的事情。 Apps have to be active to receive events, but a locked phone implies that your app will be in an inactive , background , or suspended state if it's running at all. 应用必须处于活动状态才能接收事件,但手机已锁定意味着您的应用如果正在运行,则将处于非活动背景挂起状态。

No. (Not if you're talking about an 'app' in the sense of the App Store) 否。(如果您是在App Store的意义上谈论“应用”,则不会)

The only way an app can interact with the lock screen is through notifications, and cannot alter the standard lock screen interface. 应用程序与锁定屏幕进行交互的唯一方法是通过通知,并且不能更改标准的锁定屏幕界面。

You can alter the lock screen with a MobileSubstrate tweak on a jailbroken phone, but this requires reverse-engineering SpringBoard (the iOS launcher app), can be quite complicated and obviously cannot be distributed through the App Store 您可以在越狱的手机上通过MobileSubstrate调整来更改锁定屏幕,但这需要对SpringBoard(iOS启动器应用程序)进行反向工程,可能会非常复杂,并且显然无法通过App Store进行分发

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

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