Autorotation lock, programmatically

后端 未结 7 589
清酒与你
清酒与你 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:59

    Use the following...

    -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
        return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
    }
    
    0 讨论(0)
提交回复
热议问题