Detect iOS device orientation lock

前端 未结 3 700
青春惊慌失措
青春惊慌失措 2020-12-30 09:59

How can I programmatically check whether the device orientation is locked in iOS? I see nothing in UIDevice. I know that this is supposed to be transparent to the app. But I

3条回答
  •  心在旅途
    2020-12-30 10:22

    I don't think you can find out if the orientation is locked. I have looked for that some time ago and found nothing. What you can do is ignoring the orientation and just offer landscape in your view controller... then it will be shown in landscape no matter what.

    I think this is what youtube is doing as well.

提交回复
热议问题