samedi 20 septembre 2014

ios 8 UIView not moving up when keyboard appers


Vote count:

0




I am developing an chat app which has UITableView and a UIView containing a UITextField and a button in it. I am using the following code to move the UIView up when keyboard appears.




  • (void)keyboardWillShow:(NSNotification *)notification {


    NSDictionary* info = [notification userInfo]; CGSize kbSize = [[info objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;


    [UIView animateWithDuration:0.2f animations:^{



    CGRect frame = self.inputView.frame;


    UIInterfaceOrientation orientation = self.interfaceOrientation; if (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeLeft) frame.origin.y -= kbSize.height; else frame.origin.y -= kbSize.width;



    self.inputView.frame = frame;


    ; }]; }




This code is working fine till iOS 7 but in iOS 8 UIView is not displaying above the keyboard.


Can anyone please suggest what could be the possible issue or is there anything that has changed in iOS 8.


Regards Gurpreet



asked 1 min ago







ios 8 UIView not moving up when keyboard appers

Aucun commentaire:

Enregistrer un commentaire