Use a UITextView instead of a UITextField . UITextField does not have an isEditable property. The following Swift 5 code shows a possible implementation of a UITextView instance that meets your requirements:
textView.isUserInteractionEnabled = true textView.isEditable = false
According to the documentation, isUserInteractionEnabled determines whether user events are ignored and removed from the event queue, and isEditable indicates whether the receiver is editable.
source share