If you don't want to hard code the keyboard size or position
From here:
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(keyboardNotification:)
- name:UIKeyboardWillShowNotification
- object:nil];
The keyboardNotification method looks like this:
- - (void)keyboardNotification:(NSNotification*)notification {
- NSDictionary *userInfo = [notification userInfo];
- NSValue *keyboardBoundsValue = [userInfo objectForKey:UIKeyboardBoundsUserInfoKey];
- [keyboardBoundsValue getValue:&keyboardBounds];
- }
No comments:
Post a Comment