keyboard - how to detect which UIViewObject is tapped in swift? -


i have uitextview in tableviewcell , trying save text. did textviewdidendediting save data. added gesture detect tap , hidekeyboard each tap. when user tap 1 textview other, keyboard gets closed , open again. don't like. thinking hidekeyboard if current tap not on textview. please me doing using swift.

tapping outside close keyboard difficult.

  1. you try put gesture specific areas , not textfields, difficult because need set more geastures probably
  2. try find out if tap gesture located in view , if happens on textfield.... not cool
  3. throw away geasture. tableviews activate dismiss keyboard on drag. common behavior removing it. close keyboard when pressing return. delegate call textview function "textfieldshouldreturn" should call [textview resignfirstresponder]. or add custom keyboard accessory view has done button.

on third case dont have fight , hack. feel free correct me :)


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -