ios - Prevent keyboard dismissal on UITableView cell touch -
i have uitableview
several rows buttons inside. same page contains uitextfield
control. once activated textfield
input want keep active if press button within cell within uitableview.
right touch on uitableview
dismiss keyboard , doesn't trigger uitouchupinside
. tried disable cancellable content touch
didn't help.
you try using custom gesture recognizer
var tap:uitapgesturerecognizer = uitapgesturerecognizer(target: self, action: "dismisskeyboard") self.view.addgesturerecognizer(tap)
then add action
func dismisskeyboard() { self.view.endediting(false) }
if user taps anywhere on screen, wont dismiss keyboard since wont end editing.
Comments
Post a Comment