如何在iPhone,iOS 3.2或更高版本上获得键盘UIView

时间:2010-08-16 12:16:57

标签: iphone ipad keyboard notifications overlay

1 个答案:

答案 0 :(得分:3)

我添加了简单地使用此[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow) name:UIKeyboardWillShowNotification object:nil];

- (void)keyboardWillShow { [self performSelector:@selector(addHideKeyboardButtonToKeyboard) withObject:nil afterDelay:0]; }

当键盘出现时调用。