1

My app is iPhone based app , while running my application in iPad device I select the UITextField, It takes 10 to 20 secs to display the keyboard for the first time in the iPad device alone,but later it working fine in displaying keyboard, Its a strange thing,

Please help me to get rid of this problem

satheesh
  • 2,770
  • 2
  • 14
  • 19
  • 1
    try this answer http://stackoverflow.com/questions/9357026/super-slow-lag-delay-on-initial-keyboard-animation-of-uitextfield – digitalHound Dec 05 '15 at 15:33

1 Answers1

1

This worked for me.

- (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];
}

Taken from this stack overflow answer: Super slow lag/delay on initial keyboard animation of UITextField

Community
  • 1
  • 1
digitalHound
  • 4,384
  • 27
  • 27
  • 1
    From what I've read elsewhere it seems to be an issue in debug mode when launching the first time due to the optimization settings in your build settings. Fastest, Smallest [-Os]. I would double check if you still see the issue when building in release mode. If you don't then you could wrap the preloading code in an #ifdef DEBUG so it will only be added when you're running in debug mode for convenience. A 10-20 second delay is longer than I was experiencing. I was only seeing around 5-7 second delays. – digitalHound Dec 06 '15 at 23:12