Disable blinking cursor from UITextField in swift?
问题 How to disable cursor in Swift from UITextField ? Condition - When the user logs in, then enter into application. If user can may me logout from application then not show cursor into UITextField. 回答1: First you need to confirm to UITextFieldDelegate and then set you textField like yourTextField.delegate =self add yourTextField.resignFirstResponder() to your code. Call resignFirstResponder to yourTextField. and you can also use below code (According to your need). In delegate method