iOS 开发实用技术导航
NSHipster 中文版
› http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
› http://www.cocos2d-iphone.org/
CocoaPods
› http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
› http://code.google.com/mobile/analytics/
WWDC
› https://developer.apple.com/wwdc/
Design Guides and Resources
› https://developer.apple.com/design/
Transcripts of WWDC sessions
› http://asciiwwdc.com
Cocoa with Love
› http://cocoawithlove.com/
Cocoa Dev Central
› http://cocoadevcentral.com/
NSHipster
› http://nshipster.com/
Style Guides
› Google Objective-C Style Guide
› NYTimes Objective-C Style Guide
Useful Tools and Services
› Charles Web Debugging Proxy
› Smore
DavidHu
V2EX  ›  iDev

关于 iOS 第一次加载键盘特别慢的问题

  •  1
     
  •   DavidHu · Oct 14, 2015 · 3718 views
    This topic created in 4003 days ago, the information mentioned may be changed or developed.

    第一次加载 UIKeyboard ,会非常卡,大概 3-5 秒的延迟,有什么好的方法去预加载吗?因为第一次加载过后,后面都不会卡了

    有一个方法感觉不是特别好

    UITextField *lagFreeField = [[UITextField alloc] init];
    [self.window addSubview:lagFreeField];
    [lagFreeField becomeFirstResponder];
    [lagFreeField resignFirstResponder];
    [lagFreeField removeFromSuperview];
    

    在 didFinishLaunchingWithOptions 方法里面加入上面的代码可以把加载的时候挪到启动的时候,但是这样感觉还是不好,会导致启动太慢。其他的文章有点云里雾里的,没有找到能解决问题的方法。

    3 replies  •  2015-10-22 11:51:39 +08:00
    ibcker
        1
    ibcker  
       Oct 14, 2015
    我也是用这个
    Tedko
        2
    Tedko  
       Oct 15, 2015
    same question here
    Tedko
        3
    Tedko  
       Oct 22, 2015
    有人知道怎么 fix 麽
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5224 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 134ms · UTC 03:03 · PVG 11:03 · LAX 20:03 · JFK 23:03
    ♥ Do have faith in what you're doing.