Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)keyboardWasShown:(NSNotification*)aNotification
- {
- NSLog(@"%@",NSStringFromSelector(_cmd));
- NSDictionary *info = [aNotification userInfo];
- CGSize kbSize = [[info objectForKey: UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;
- NSLog(@"keyboard width: %.f keyboard height: %.f ",kbSize.width, kbSize.height);
- UIEdgeInsets contentInsets = UIEdgeInsetsMake(0.0, 0.0, kbSize.height, 0.0);
- self.myScroll.contentInset = contentInsets;
- self.myScroll.scrollIndicatorInsets = contentInsets;
- CGRect aRect = self.view.frame;
- aRect.size.height -= kbSize.height;
- // if (!CGRectContainsPoint(aRect, self.contactTextView.frame.origin)) {
- CGPoint scrollPoint = CGPointMake(0.0, self.contactTextView.frame.origin.y - kbSize.height);
- [self.myScroll setContentOffset:scrollPoint animated:YES];
- NSLog(@"%.f",self.myScroll.contentOffset.y);
- // }
- }
Add Comment
Please, Sign In to add comment