IOS: UItextfield disabled

后端 未结 2 541
感动是毒
感动是毒 2021-01-12 13:03

When we push on a textfield, a cursor appear in this textfield; but I don\'t want that this cursor appear; then I want make this textfield disabled, where you can\'t write i

2条回答
  •  感情败类
    2021-01-12 13:22

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

    textField.enabled = NO;
    

    or

    textField.userInteractionEnabled = NO;
    

提交回复
热议问题