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.
if you just don't want cursor
then you can set it's tintColor
to clearColor
. In this case your textField will be active. If you want to make it inactive field then you should call resignFirstresponder
method of textfield
!
For Swift 4 that works for me:
textField.tintColor = UIColor.clear
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With