iOS. How to enable and disable rotation on each UIViewController?

后端 未结 8 2136
栀梦
栀梦 2020-12-13 04:10

I have an UIViewController, I want to disable or enable rotation of the screen in different scenarios

Example:

if flag {
   rotateDevice = false
}
e         


        
8条回答
  •  渐次进展
    2020-12-13 05:01

    set device orientarion portrait in Target -> General -> Deployment Info -> Portrait

提交回复
热议问题