UITextFile获取焦点但不显示软键盘
UITextfield获取焦点时,进入textFieldShouldBeginEditing方法,在这个方法中注册通知:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillShow:)
name:UIKeyboardWillShowNotification object:nil];
//隐藏系统键盘
- (void)keyboardWillShow:(NSNotification *)Notification{
UIWindow* tempWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:1];
[tempWindow setAlpha:0];
}

浙公网安备 33010602011771号