Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hide shortcuts bar when hide keyboard ios(Ipad)

Shortcut bar is not hidden when hide the keyboard by clicking keyboard icon in the bottom-right of the keyboard,and can not trigger UIKeyboardWillHideNotification.

enter image description here

enter image description here

Thanks

like image 297
Leo Avatar asked Dec 27 '25 18:12

Leo


1 Answers

As of iOS 9 beta 2, the documentation is still very thin on the ground (and vaguely misleading) but I've had success using this UITextFieldDelegate method implementation.

- (void)textFieldDidBeginEditing:(UITextField*)textField  
{  
    UITextInputAssistantItem* item = [textField inputAssistantItem];  
    item.leadingBarButtonGroups = @[];  
    item.trailingBarButtonGroups = @[];  
}  
like image 161
Maulik shah Avatar answered Dec 31 '25 00:12

Maulik shah