不容易获得键盘对象的时候可以这样
[[UIApplication sharedApplication] sendAction:@selector(resignFirstResponder)to:nilfrom:nilforEvent:nil];
还可以
[[[UIApplication sharedApplication] keyWindow] endEditing:YES];
不容易获得键盘对象的时候可以这样
[[UIApplication sharedApplication] sendAction:@selector(resignFirstResponder)to:nilfrom:nilforEvent:nil];
还可以
[[[UIApplication sharedApplication] keyWindow] endEditing:YES];
本文标题:收回键盘的其他方式
本文链接:https://www.haomeiwen.com/subject/cvqpottx.html
网友评论