问题
I have a viewcontroller from here I am getting a popover. From this popover i am presenting a view as modal view. There is a textview in it. When editing begins, the entire modal view moves up (which usually people desire). But I do not want it that way. Is there any way, i can block my modal view from moving up and down on keyboard show and hide ?
回答1:
If I guessed correctly then you need to set yourviewControler.modalPresentationStyle=UIModalPresentationPageSheet;
instead of what you are probably using right now yourviewControler.modalPresentationStyle=UIModalPresentationFormSheet;
来源:https://stackoverflow.com/questions/13529995/dont-want-the-modal-view-to-move-up-on-keyboard-show