Reputation: 8125
I have a UIViewController
that will display a fullscreen subview on a button press:
As you can see the UI elements only cover the top half so that the keyboard has space to fit underneath neatly. This is how I want it to work.
However, as soon as I try to set the TextField
delegate
to the ViewController, the screen ends up looking like this:
How is it possible that setting the delegate if affecting the way it is displayed, and how do I get it to behave like I want?
Upvotes: 0
Views: 209
Reputation: 41632
This should work just fine. The subview needs the proper struts and springs set - your view should have no springs, and be attached top/left of the superview. If it still happens try to print out the subview frame and spring/struts values, and the superview frame (your primary view). You should do the superview before the keyboard pops, and you can then see if its changing or just your subview.
Upvotes: 1