Become first responder without animation

Viewed 9375

Is there a way for a UITextField to become first responder without the animation of the keyboard? That is, make it such that the keyboard just appears?

Basically, I'm pushing a second UIViewController over the UIViewController that has the UITextField, and when that second view controller gets popped off the stack, I want the UITextField to immediately have first responder status so that when the second view controller gets popped, the user never notices the text field wasn't first responder.

Right now I have it so that when it's popped, the keyboard animates up the screen, but I don't want that to be seen.

Any ideas?

4 Answers

I don't think this was an option when the question was first asked, but UIView.performWithoutAnimation works appropriately.

UIView.performWithoutAnimation {
    self.composeView.focusTextField()
}
Related