detect iPad keyboard Hiding button

前端 未结 4 1787
有刺的猬
有刺的猬 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:17

    put this to viewDidLoad

    // register to track event when user presses hide keyboard button on bottom right cornor for iPAD
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldShouldReturn:) name:UIKeyboardWillHideNotification object:nil];
    

    and this will make your - (BOOL)textFieldShouldReturn:(UITextField *)textField; delegate method to get called when keyboard down button is pressed in iPAD.

提交回复
热议问题