don't want the modal view to move up on keyboard show

独自空忆成欢 提交于 2019-12-04 04:33:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!