这两天遇到一个问题。测试环境:ios8,真机
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(keyboradShow:) name:UIKeyboardWillShowNotification object:nil];
注册通知后,用真机测试,键盘出现的时候,keyboradShow会调用三次。测试了半天,才知道,真机中,中文键盘会调用3次的通知。
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(keyboradShow:) name:UIKeyboardWillShowNotification object:nil];
注册通知后,用真机测试,键盘出现的时候,keyboradShow会调用三次。测试了半天,才知道,真机中,中文键盘会调用3次的通知。