Modal View Controller Won't Start in Landscape Mode

后端 未结 7 1419
死守一世寂寞
死守一世寂寞 2020-12-10 17:10

I have a navigation based app that has a detail view (UIWebView) with action buttons across the bottom in a UIToolbar. I want to add \'notes\' when the \'notes\' button is

7条回答
  •  情歌与酒
    2020-12-10 18:08

    Modals don't always get information about rotations, and they get their info from the status bar, which doesn't always work right. Put this in your viewWillAppear to fix: [UIApplication sharedApplication].statusBarOrientation = self.interfaceOrientation And, if you want a navigation controller inside your modal, you need to create one.

    Also, you don't need the setNeedsDisplay. That only effects the current views, not the modal you are presenting.

提交回复
热议问题