Autorotation lock, programmatically

后端 未结 7 625
清酒与你
清酒与你 2021-01-02 18:58

Does anybody know if there is a possibility to lock autorotation of iPhone programmatically for just one view? I want to make some kind of help with semi-transculent view, b

7条回答
  •  攒了一身酷
    2021-01-02 19:50

    -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {                  
        return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight);  
    }
    

提交回复
热议问题