Note that there are some explanatory texts on larger screens.

plurals
  1. POmanaging keyboard in ios for number of textfields
    primarykey
    data
    text
    <p>Everything is fine for me except one case. When I begin editing the textfield, keyboard was shown: method is getting called, but without resigning first one if I edit the next textfield, this method is not getting called.</p> <pre><code>- (void)registerForKeyboardNotifications { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWasShown:) name:UIKeyboardDidShowNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillBeHidden:) name:UIKeyboardWillHideNotification object:nil]; } -(void)keyboardWasShown:(NSNotification*)aNotification { NSDictionary* info = [aNotification userInfo]; CGSize kbSize = [[info objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size; UIEdgeInsets contentInsets = UIEdgeInsetsMake(0.0, 0.0, kbSize.height, 0.0); testScroll.contentInset = contentInsets; testScroll.scrollIndicatorInsets = contentInsets; CGRect aRect = self.view.bounds; CGPoint activepoint= [active.superview convertPoint:active.frame.origin toView:nil]; if (!CGRectContainsPoint(aRect, activepoint) ) { CGPoint scrollPoint = CGPointMake(0.0, active.frame.origin.y+active.frame.size.height-kbSize.height+100);// here active is my particular textfields and i an changing it in begin editing method. [testScroll setContentOffset:scrollPoint animated:YES]; } </code></pre> <p>here my problem is even though i was switching between two text fields my scrollview has to set for particular offset.</p> <p>thank you.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload