I need to adapt an app to iOS 7, and I'm having troubles when being run on iPad, since the size of the screen is a little cut off on both bottom and top, as in the image.
I tried to follow some guidelines (such as this) but no luck.
It works on normal iPad 1 on iOS 6 and iPad 2 on both iOS 6 and 7, but it's just in a reduced size (not no cut off images whatsoever).
Could anybody give me some hints please?
Thanks a lot in advance.
I solved this creating a boolean in my Info.plist with the title View controller-based status bar appearance and a value NO.
Thanks everybody for the help!
As #noloman said: Set the following in your .plist
View controller-based status bar appearance (Boolean) to NO
I would suggest this also:
Status bar is initially hidden (Boolean) to YES
And call the following within the application when necessary:
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
(For example: When a MPMoviePlayerViewController* is returning from playing a video (as the status bar is shown))
Related
Already checked answers from StackOverflow to change status bar color for the whole app is to set View controller-based status bar appearance in info.plist to NO and Status bar style to UIStatusBarStyleLightContent.
Well it did change from iPhone XS and lower, but iPhone XR and iPhone XS Max were not, Still solid black. I tried to find in code if there is a code that called UIStatusBarStyleDefault but I dont see it anywhere. My current fix now is to put this [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; on didFinishLaunchingWithOptions. Any thoughts? Thanks
In iOS 12, setting NO at View controller-based status bar appearance in Info.plist won't work anymore; you must set it to YES. Your workaround is the recommended way to do so.
Reference: https://stackoverflow.com/a/52443917/188331
i was create the app for target for iphone in ios7. but when i tested that app into ipad then statusbar not hidden. in iphone its hide but not into ipad. please help me. i set the below code on my app.
i set this to appdelegate. but its not hide the statusbar for ipad.
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
i also set the View controller-based status bar appearance to NO and Status bar is initially hidden to YES into info.plist file.
Your code is correct, but since iOS 7 the iPad works slightly different with iPhone compatibility mode: the status bar is always visible, and there is no longer a 2x button to show the interface "zoomed in".
Even though your code will work fine on iPhone, the iPad will always display the status bar on iPhone apps.
I am trying to set the status bar of my entire iOS app hidden. (The app deployment target is set to iOS 7.1).
I have tried the following (and none worked):
Adding this line to application:didFinishLaunchingWithOptions: in AppDelegate.m :
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
and also this line:
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:NO];
I have tried setting the statusBar to None for each of my View Controllers in Storyboard View --> Attributes inspector --> Simulated Metrics.
I have tried adding the key Status bar is initially hidden as YES in Info.plist file of my app.
None of these worked. Can anyone guide me as to what is wrong?
Btw, I am using the latest version of XCode on my Mac and latest iOS on my test device. And, all my View Controllers have been set to Landscape mode only in Attributes inspector. And the supported orientations of the app are Landscape both sides.
Just set both properties in your .plist file.Then you will be good to go.
1.View controller-based status bar appearance -No
2.Status bar is initially hidden-YES
Hope this will help!
Have you tried setting:
View controller-based status bar appearance
to NO
In your Info.plist file?
In your info.plist file, there's a setting called "Status bar is initially hidden." Set that to "YES," and you won't have it at startup. Then you don't need to do anything in your code, the bar will show up when your app is launched.
Have anyone met the same issue? Or have I missed something.
On my iOS 7 iPad simulator I can't see the status bar anymore.
It is visible in iOS 6 iPad though.
Is it a bug, or there is a setting to fix that?
Thanks
The status bar has been changed in iOS7. While the background is not visible by default you should still see its contents. It might be not visible if you are displaying black content above a black background but you can override this method for this: - (UIStatusBarStyle)preferredStatusBarStyle.
I found this article recently about changes to consider on iOS7 for the status bar.
I am using MVYSideMenu in my application. It is working really good, the problem is that in iOS7 when the menu is open, the status bar is mixed with the menu. I have solved this by setting the TableView y position 20 pt down, but this solution is not the best, because in iOS 6 it is different. I am new in iOS and even more in iOS 7.
You can hide the status bar setting UIViewControllerBasedStatusBarAppearance to NO in Info.plist