I have a number of textfields in a view, and a textView, what I am trying to do is to tab through those UI elements after editing stops and the element resigns the status as FirstResponder.
//Code to tap on empty area on screen so key board should disappear
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
[self.view endEditing:YES];
}
//a text field should now be the first responder after text area should end editing
-(BOOL)textViewShouldEndEditing:(UITextView *)textView{
[self.txtNumber becomeFirstResponder];
return YES;
}
Problem comes after the following steps 1. textView becomes first responder 2. tap outside textview resigns as first responder 3. txtNumber becomes first responder and numpad appears 4. tap outside. now keyboard doesn't disappear