tags:

views:

24

answers:

1

hi friends.

I have an application with UIScrollView added as a subview of UIView. This Scroll view has a textfield with keyboard type set to numberPad. Now the problem is , i want to dismiss the keyboard when i tap anywhere else in the scroll view. how can i do this ... ?

A: 

Just call the textField's resignFirstResponder in the touch handler.

(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
    [myTextField resignFirstResponder];
}
taskinoor