gpt4 book ai didi

iphone - 键盘隐藏时的iOS事件

转载 作者:IT王子 更新时间:2023-10-29 07:56:46 25 4
gpt4 key购买 nike

我需要控制,在显示键盘并按下完成按钮后,何时隐藏键盘。在 iOS 上隐藏键盘时会触发哪个事件?谢谢

最佳答案

是的,使用下面的

//UIKeyboardDidHideNotification when keyboard is fully hidden
//name:UIKeyboardWillHideNotification when keyboard is going to be hidden

[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(onKeyboardHide:) name:UIKeyboardWillHideNotification object:nil];

还有 onKeyboardHide

-(void)onKeyboardHide:(NSNotification *)notification
{
//keyboard will hide
}

关于iphone - 键盘隐藏时的iOS事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10902465/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com