iOS App键盘第一次启动延迟问题
2015-09-21 20:35
393 查看
其实这不是一个问题,拔掉USB数据线,断开设备连接后,手动点击App图标以正常模式运行后会发现原来键盘的唤出速度是很快的。
Before you implement any exotic hacks to get around this problem, try this: stop the debug session, close the app from multitasking, unplug your device from the computer and run the app normally by tapping its icon. I have seen at least two cases in which the delay only occurs while the device is plugged in.
有网友通过下面的方式解决,虽然有点画蛇添足,但是至少调试方便。(因为键盘延迟这种情况只会在连机调试的时候出现)
Before you implement any exotic hacks to get around this problem, try this: stop the debug session, close the app from multitasking, unplug your device from the computer and run the app normally by tapping its icon. I have seen at least two cases in which the delay only occurs while the device is plugged in.
有网友通过下面的方式解决,虽然有点画蛇添足,但是至少调试方便。(因为键盘延迟这种情况只会在连机调试的时候出现)
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Preloads keyboard so there's no lag on initial keyboard appearance. UITextField *lagFreeField = [[UITextField alloc] init]; [self.window addSubview:lagFreeField]; [lagFreeField becomeFirstResponder]; [lagFreeField resignFirstResponder]; [lagFreeField removeFromSuperview]; }
相关文章推荐
- 峰回路转,Firefox 浏览器即将重返 iOS 平台
- 峰回路转,Firefox 浏览器即将重返 iOS 平台
- 不可修补的 iOS 漏洞可能导致 iPhone 4s 到 iPhone X 永久越狱
- iOS 12.4 系统遭黑客破解,漏洞危及数百万用户
- 每日安全资讯:NSO,一家专业入侵 iPhone 的神秘公司
- FREEBASIC 编译可被python调用的dll函数示例
- [转][源代码]Comex公布JailbreakMe 3.0源代码
- 在 Linux 下交换 Ctrl 与大写锁定键
- CS 1.5 键盘基本操作快捷键
- C#控制键盘按键的常用方法
- C#检查键盘大小写锁定状态的方法
- 提升PHP速度全攻略
- 按键盘方向键翻页跳转的javascript代码(支持ie,firefox)
- C++处理键盘输入的方法
- 键盘 keycode的值 javascript时触发事件时很有用的要素
- JavaScript取得键盘按下方向键是哪个的方法
- js鼠标、键盘事件实例代码
- 如何让div span等元素能响应键盘事件操作指南