Prevent AlertView from auto rotating

后端 未结 3 406
长情又很酷
长情又很酷 2021-01-20 05:38

The launch page of my app is set to portrait only with this little bit of code:

- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfac         


        
3条回答
  •  温柔的废话
    2021-01-20 06:00

    Try doing this in viewDidAppear:. I've seen weird behavior like this before because view layouts are not entirely defined yet. In viewDidAppear:, everything is set and laid out, so there shouldn't be any problems at that point.

提交回复
热议问题