UILabel cannot become the first responder and show inputView in UITableView

I tried to subclass UILabel called EditableLabel and implemented canBecomeFirstResponder , isUserInteractionEnabled , both of these methods return YES , in the meantime I rewrite inputView and inputAccessoryView and make them writable.

My problem is that when I click on the label, the inputView cannot be displayed on the screen. Does anyone know how to implement a subclass of a UILabel view and display an inputView?

Thank you very much.

+4
source share
1 answer

Why not just use a UITextField and set its borderStyle to UITextBorderStyleNone ?

0
source

All Articles