Is [UIScreen mainScreen].bounds.size becoming orientation-dependent in iOS8?

后端 未结 18 998
北恋
北恋 2020-11-22 16:55

I ran the following code in both iOS 7 and iOS 8:

UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
BOOL landsca         


        
18条回答
  •  迷失自我
    2020-11-22 17:33

    Yes, it's orientation-dependent in iOS8, not a bug. You could review session 214 from WWDC 2014 for more info: "View Controller Advancements in iOS 8"

    Quote from the presentation:

    UIScreen is now interface oriented:

    • [UIScreen bounds] now interface-oriented
    • [UIScreen applicationFrame] now interface-oriented
    • Status bar frame notifications are interface-oriented
    • Keyboard frame notifications are interface-oriented

提交回复
热议问题