简体   繁体   English

iOS会像锁定屏幕一样显示锁定/解锁滑块吗?

[英]iOS display a lock/unlock slider like the lock screen?

I'm trying to let the users of my app cancel an active alarm using a slider, like the timer app or the iPhone lock screen. 我试图让我的应用程序的用户使用滑块取消活动闹钟,如计时器应用程序或iPhone锁定屏幕。

Is this control available to us as developers? 作为开发人员,我们可以使用此控件吗? If so, what's the name of it, and do I need to add it programmatically? 如果是这样,它的名称是什么,我是否需要以编程方式添加它? I do not see it in the interface builder. 我在界面构建器中没有看到它。

Thank you! 谢谢!

You could always try this on cocoacontrols. 你总是可以在cocoacontrols上尝试这个。

Slide to unlock control 滑动解锁控制

It's not a standard control - you'll need to create it yourself. 它不是标准控件 - 您需要自己创建它。

However, I think you should be able to customize the slider control. 但是,我认为您应该能够自定义滑块控件。 You can change the look and feel of that by supplying your own graphics, and it should be easy to simulate the behavior of the lock slider (such as making it slide back to 0 if it doesn't get all the way across). 您可以通过提供自己的图形来更改其外观,并且应该很容易模拟锁定滑块的行为(例如,如果它没有完全滑过,则将其滑回0)。

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

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