Guest User

Untitled

a guest
Jun 23rd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. //Throw this on your UITableViewDelegate (probably your UITableViewController) to achieve the "keyboard dismisses when I tap away" effect.
  2. //Your users will thank you. A lot.
  3.  
  4. - (void) scrollViewWillBeginDragging:(UIScrollView *)scrollView {
  5. [self.view endEditing:YES];
  6. }
  7.  
  8. //The endEditing: method on UIView comes to us from a category that UITextField adds to UIKit that makes the view or any subview that is the first responder resign (optionally force), that's what the "YES" bit is.
Add Comment
Please, Sign In to add comment