IOS: UItextfield disabled

一个人想着一个人 提交于 2019-12-01 05:43:40

Can you set enabled property/userInteractionEnabled of text field to No in ViewDidLoad() using the code

textField.enabled = NO;

or

textField.userInteractionEnabled = NO;

If you're working with storyboards or .nib files and you want it to start out disabled you can also easily uncheck the enabled property in interface builder for some time-saving.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!