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

Popular posts from this blog

html - height not adding height to a empty div -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

python - Robot Framework location and name of keyword -