I'm trying to get a setup similar to what Facebook use (if they use a
UITextView
UITextView
You need to prevent the UITextView
from becoming first responder.
1. Subclass UITextView
to your own custom class (MyTextView
).
2. Override canBecomeFirstResponder()
. Here's an example in Swift 2.0.
class MyTextView: UITextView {
override func canBecomeFirstResponder() -> Bool {
return false
}
}
Any links detected will still be enabled. I tested this with a phone number.