Autorotation lock, programmatically

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

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
    {
        //If you don't want to support multiple orientations uncomment the line below
        return (toInterfaceOrientation == UIInterfaceOrientationPortrait);
        //return [super shouldAutorotateToInterfaceOrientation:toInterfaceOrientation];
    }
    

提交回复
热议问题