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];
}

 

posted @ 2014-08-29 10:26  Jeedaa_IOS  阅读(373)  评论(0)    收藏  举报