本文介绍了禁用与分段控件的用户交互?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想启用和禁用用户与 UISegmented 控件的交互.我注意到它的超类 UIControl 有一个名为已启用"的属性,这是我需要设置的以禁用/启用我的控件吗?

I want to enable and disable user interaction with a UISegmented Control. I noticed that its superclass UIControl has a property called "enabled" is this what I need to set in order to disable/enable my control?

推荐答案

是的,enabled 属性正是您想要的.您也可以使用 userInteractionEnabled 为好,但我认为 enabled 就足够了.

Yes, the enabled property is what you want. You can also use userInteractionEnabled as well, but I think that enabled will suffice.

这篇关于禁用与分段控件的用户交互?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 14:47