Wird [UIScreen mainScreen] .bounds.size in iOS8 orientierungsabhängig?

Lief ich den folgenden code in iOS 7 und iOS 8:

UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
BOOL landscape = (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight);
NSLog(@"Currently landscape: %@, width: %.2f, height: %.2f", 
      (landscape ? @"Yes" : @"No"), 
      [[UIScreen mainScreen] bounds].size.width, 
      [[UIScreen mainScreen] bounds].size.height);

Im folgenden wird das Ergebnis aus iOS 8:

Currently landscape: No, width: 320.00, height: 568.00
Currently landscape: Yes, width: 568.00, height: 320.00

Vergleich zu dem Ergebnis in iOS 7:

Currently landscape: No, width: 320.00, height: 568.00
Currently landscape: Yes, width: 320.00, height: 568.00

Gibt es keine Dokumentation, die Angabe dieser änderung? Oder ist es ein temporärer bug in iOS 8 APIs?

InformationsquelleAutor der Frage lwxted | 2014-06-10

Schreibe einen Kommentar