I am trying to cover the status bar with my own view and do this in order to calculate the frame for my view by doing something similar (also after rotation):
UIScreen *screen = [UIScreen mainScreen]; CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
For iOS8 + (because ios8 UIScreen is orientation dependent):
CGRect frame = [screen.coordinateSpace convertRect:statusBarFrame toCoordinateSpace:screen.fixedCoordinateSpace]; [self setFrame:frame];
For iOS7:
[self setFrame:statusBarFrame]
It works great for iOS8 and below, but when creating my application with Xcode 7 beta 4 and iOS 9 SDK, something is wrong when you launch the application in landscape or upsidedown (it works fine if the application runs in portrait) ...
i.e. when I launch the application, while the Upsidedown user uiwindow, which should cover the status bar, always ends at the bottom of the screen, any ideas what might be wrong?
objective-c ios9 statusbar uiscreen uiwindow
Artrmz
source share