How to set device (UI) orientation programmatically?

后端 未结 10 1524
感情败类
感情败类 2020-11-30 01:14

Would like everything on the screen (UI) to be able to rotate from landscape left to right or vica versa.

How do I go about doing this? Is this private?

I

10条回答
  •  粉色の甜心
    2020-11-30 01:58

    If you present a modal view controller which implements -shouldAutorotateToInterfaceOrientation: to only support one orientation, the whole interface will automatically be forced into it. I don't think there's a way to programmatically change orientation otherwise.

提交回复
热议问题