I have an app that is showing the status bar on most screens. Most of the app is locked to portrait mode but one section makes sense to be in landscape. I would like to transition to the landscape with a modal slide in which works fine. The issue is I want the landscape view to hide the status bar. Currently is looks ugly as the status bar just switches to the top of the landscape view and shows a little black bar on the portrait one as it slides in. Is there a way to do this elegantly?
你可以这样做:
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.