Keyboard Animation Issues When Calling becomeFirstResponder within a Modal View Controller

前端 未结 5 1832
北荒
北荒 2020-12-13 23:11

I\'ve been having some issues with calling -becomeFirstResponder on a UITextField contained with a view controller that is presented modally. I cal

5条回答
  •  悲&欢浪女
    2020-12-13 23:30

    Try moving your code that sends becomeFirstResponder out of viewDidLoad and into viewWillAppear. I think it is starting too early, you want the keyboard animation to happen when the view appearing animation happens.

提交回复
热议问题