0
votes

Is it possible to present my modal view controller with the keyboard already visible? Currently, the modal's text view becomes the first responder as soon as it's view is loaded, which causes the keyboard to animate coming up from the bottom.

This is halfway through the transition (they keyboard is animating as well)

I'd like the keyboard to already be on the modal and be a part of it's transition. Any suggestions?

2
sooner than viewDidLoad or init ... NoDanut Pralea

2 Answers

3
votes

The keyboard is a separate UIWindow object. It is not in the same view hierarchy as your view controller's view. To make this happen, you would have to dig around in the UIApplication's windows property for the keyboard window and replace its default animation with a custom animation.

0
votes

You could try putting the becomeFirstResponder code in vieWillAppear, but that isn't the "right" thing to do anyway.

You will probably need to replace the actual keyboard animation with a custom animation to force it to load immediately and without scrolling up.