iOS - How can I preload the keyboard?

后端 未结 4 1583
滥情空心
滥情空心 2021-01-30 13:43

The Problem

In most iPhone apps, there\'s a quite a bit of delay the first time that the keyboard is presented (presumably creating the keyboard takes quite a bit of o

4条回答
  •  日久生厌
    2021-01-30 14:00

    making the textfield the firstResponder and then resigning it in the viewdidload.. this seems to work with no lag when the keyboard is loaded again...

    - (void)viewDidLoad
    {
        [super viewDidLoad];
    
        [textField becomeFirstResponder];
        [textField resignFirstResponder];
            // Do any additional setup after loading the view, typically from a nib.
    }
    

提交回复
热议问题