Permalink
Browse files

make firstResponder automatically resign when the scroll view is tapped

  • Loading branch information...
wordofchristian committed Jun 6, 2011
1 parent 4dbb0f3 commit e5dbefc3b2b501ee8758f644f3b54f64fbebbf10
Showing with 4 additions and 0 deletions.
  1. +4 −0 TPKeyboardAvoidingScrollView.m
@@ -39,6 +39,10 @@ -(void)dealloc {
[super dealloc];
}
+- (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
+ [[self findFirstResponderBeneathView:self] resignFirstResponder];
+ [super touchesEnded:touches withEvent:event];
+}
- (void)keyboardWillShow:(NSNotification*)notification {
if (!UIEdgeInsetsEqualToEdgeInsets(priorInset, UIEdgeInsetsZero)) return;

0 comments on commit e5dbefc

Please sign in to comment.