I have a view controller inside a UIPopoverController
. When I open a keyboard for a text field that belongs to the view in the popover, the view resizes to accommodate the keyboard. However, the view doesn't go back to the original size when the keyboard is dismissed.
Any ideas how to get it to resize back to what it was?
Had this problem myself recently.
The way I got around it was to observe the keyboard disappearing in the controller which controls the UIPopoverController:
And then in
-presentSearchPopover
, present the UIPopoverController again (it's quite a seamless transition):Don't forget to remove the observer in
-dealloc
or similar too: