如何禁用UIPickerView(Objective-C)? [英] How to disable UIPickerView (Objective-C)?
本文介绍了如何禁用UIPickerView(Objective-C)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以将UIPickerView设为只读?这意味着用户无法浏览选项.
Is there a way to make the UIPickerView read-only? This means that the user cannot flip through the options.
PS.这与在 didSelectRow
方法中不传递任何内容不同,因为我只希望用户看到选择器在那儿,而不要触摸它.
PS. This is not the same as not passing anything in the didSelectRow
method because I only want the user to see that the picker is there and not to touch it.
推荐答案
将选择器的 userInteractionEnabled
设置为NO.
Set the picker's userInteractionEnabled
to NO.
这篇关于如何禁用UIPickerView(Objective-C)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文