问题起因于一个UITextField获取到了焦点但键盘没有弹出(ios4.3以及ios5.1都有此问题), 折腾几小时后终于发现了原因.
stackoverflow原帖:http://stackoverflow.com/questions/8669627/uitextviews-becomefirstresponsder-not-working-proprly
"There's a known bug in iOS with resigning and becoming first responder within the same runloop. Try the following"
[textField resignFirstResponder];
[textView performSelector:@selector(becomeFirstResponder) withObject:nil afterDelay:0.0];
附: runloop introduce 原文
http://blog.csdn.net/favormm/article/details/6928432
以下内容为转载:
NSTimer、 NSTask、 NSThread 和 NSRunloop 之间的区别
http://blog.csdn.net/zhangchu1994/article/details/7286018
NSRunLoop概述
http://www.cnblogs.com/likwo/archive/2011/07/28/2119777.html
转载于:https://www.cnblogs.com/tsubasa/archive/2013/02/22/2922066.html
相关资源:数据结构—成绩单生成器