detect iPad keyboard Hiding button

前端 未结 4 1796
有刺的猬
有刺的猬 2020-12-18 03:00

Hi is there any way to detect iPad keyboard hiding button ? i mean when user press this button :

\"alt

4条回答
  •  半阙折子戏
    2020-12-18 03:19

    I'm not sure what you want to accomplish, but maybe this can help you: Register with NSNotificationCenter to receive the UIKeyboardWillHideNotification and/or UIKeyboardDidHideNotification.

    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(myKeyboardWillHideHandler:)
                                                 name:UIKeyboardWillHideNotification
                                               object:nil];
    
    ...
    
    - (void) myKeyboardWillHideHandler:(NSNotification *)notification {
        NSLog(@"Keyboard wants to hide. What a coward.");
    }
    

提交回复
热议问题