I'm trying to use an UITextView as a button, and after clicking on the UITextView it should pop to to another UIViewController (not the root one, next one).
Using an UIButton works fine (by dragging to next UIViewController and choosing "Push" as the segue type, without doing any coding). But, doing the same thing with a UITextView does not work!
So, my question is how to navigate to the next view controller using an UITextField?
Try adding a
UITapGestureRecognizer
to the text view and using that callback to trigger a segue.I don't think you can do this without code.
Set the userInteractionEnabled attribute?
You should be able to use the textView like a button...
Add Tap Gesture to UITextView
Push or Present UIVieWController in UITapGestureRecognizer action method.
try this code