Stop a modal UIViewController from rotating

后端 未结 3 1575
栀梦
栀梦 2021-01-13 18:34

The modal UIViewController\'s parent auto-rotates, but when the modal VC is up I only want it to appear in portrait and not be rotatable. I have tried simply re

3条回答
  •  佛祖请我去吃肉
    2021-01-13 19:26

    It can be doable, but I would think twice before doing that.

    As a user;

    • I launch the app and use in landscape.
    • trigger an event (eg. press button).
    • see a view which is portrait.
    • rotate the phone and look in portrait.
    • close the modal view.
    • get landscape view again.
    • need to rotate the phone again

    Bad usability...

提交回复
热议问题