I have a UIViewController inside a UINavigationController presented on an iPad with iOS8. I use
self.myNavController.modalPresentationStyle = UIModalPresentationFormSheet;
In my view controller, I have a text box. Due to the design of the user interface of the view controller, when the user enters the text box and the keyboard appears, I need to move the view controller to the screen. On iOS7, I animated the change
self.myNavController.view.superview.frame.origin
to move the view controller up and back. It works well.
However, on iOS8, this no longer works. In fact, oddly enough, the behavior of the view manager shifts slightly down and then backs up (all when I assign self.myNavController.view.superview.frame.origin CGPoint with a smaller estimated Y coordinate).
I originally worked on the suggestion given in this SO question
Resize ModalViewController and center it in iOS 7And I recently tried the suggestion given in Moving the dialog up when the keyboard is working, except when the ipad is deployed , but little can be done. In fact, with the idea of ββconverting in a response, I can at least make the view controller move in the right direction (i.e., Up), but it does not stay there. He is quickly returning.
Ideas?
source share