Is this the right way to make an iPad app full screen? - ios

I want to disable the status bar in iOS to make my app full-screen. I managed it but I'm not sure I did it correctly.
Here's what I did:
In IB, set the Simulated Metric for Status Bar to None
Added an entry in the Info.plist UIStatusBarHidden = YES
Moved my views around in IB so they fill the screen.
I'm not using OpenGL or anything like that, it's just a straightforward Cocoa Touch app which, like many others of a similar type, benefits from having access to every pixel on the screen.
To my shame I got the technique from one of those omnipresent 'tutorials' that litter the web like the dust bunnies under my bed. It was dated 2009. Is there a more modern, approved technique I should be using instead?
If it helps I'm targeting iOS 5 only.

The statusBarHidden property of the shared UIApplication object controls whether the status bar is visible. The UIStatusBarHidden entry in the app's Info.plist sets the value of that statusBarHidden property when the application is launched. You can change the property's value to hide or show the status bar while your app is running.
These are the current methods for controlling the status bar's visibility as of iOS 5.0.1.

Related

What is this iOS Accessibility UI element, and how is it enabled/disabled?

I have members complaining that they are unable to tap certain buttons located in a custom navigation bar at the top of my iOS app. The common complaint is that when they do attempt to tap, they see UI that looks like this:
This is about a 200x200 pixel square that appears over the middle of the screen.
We have no code in our app that is capable of drawing that kind of UI. I can only assume this is being triggered by some kind of iOS UI or Usability setting. The only thing I can think of is that we also have a UITabBarController, and the user (in this case) happens to be on the "Browse" tab of my app. If possible, I would like to either a) programmatically disable this or b) inform the user how he can manually disable this UI via an iOS setting someplace.
Can anyone identify what might trigger the UI you see above?
It is a new feature of iOS 11. Take a look at Bar Item Images.
To disable this you should remove an image from Accessibility on Bar Item (see link). But I am not sure how (or even whether) you can define that a user has enabled large content text.
For more info take a look at What's New in Accessibility.

How To Avoid iOS Blue Location NavigationBar Messing Up My StatusBar?

iOS has a feature that (I'm using both iOS 10 and 11) when you use a location-based app, say Waze, and you put that app on the background, there will be a blue navigation bar with a blue status bar background saying that Waze is currently using your location. Then open up your own project and close the Waze, this will happen.
Any idea how to fix this one? I'm guessing some configuration in the AppDelegate. Something to setup upon making your project active. I've tried the same steps in my other project and I have no idea why does that other project handle it a little better. The other project has a readable status bar but different background color, still quite a mess but better than in this project in the photo.
This is how your app should work:
The status bar is transparent.
Your view controller's main view should underlap the status bar; it should be fullscreen.
Your views should use autolayout to respond to changes in the size of the top bars (they should be pinned to the top layout guide or, in iOS 11, the top of the safe area).
You are not doing that correctly, so your app does not behave correctly when the status bar size changes due to the location manager bar. You probably have the same problem with phone calls coming in. You can easily test in the Simulator by choosing Toggle In-Call Status Bar.

is it possible to control status bar position under iOS 8?

I want to know if it possible to control the position of the status bar with iOS 8 SDK?
I know i can use supportedInterfaceOrientations method, but now with the iOS 8 SDK if i change the orientation of the rootViewController all child viewController will take the same orientation because of viewWillTransitionToSize method.
Somebody can help me ?
Thanks in advance
According to the apple docs here:
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/Bars.html
Don’t create a custom status bar. Users depend on the consistency of the system-provided status bar. Although you might hide the status bar in your app, it’s not appropriate to create custom UI that takes its place
This means that no, you cannot and should not change the default position of the status bar or put anything under it or around it that would obscure it. You can hide it or change its default appearance if you like, that is explained in the docs.

Auto adjust layouts after restoring iOS status bar

After initially designing my UIViewControllers in storyboard without a status bar, I have been instructed that we need to put them back in. Now all the layouts overlap the status bar. Is there an easy way to have everything automatically adjust to start with y=0 below the status bar? Moving and re-pinning everything to the top layer guide is going to be both tedious and error prone - seems like it should happen automatically.
I am using Xcode 6.1, targeting iOS 7.1 and later.
I think there is just one way to make a script to rewrite Storyboard XML file. You try to change constraints for one ViewController manually and check the difference.

UIKit - Place own statusbar above UINavigationController

My app is in landscape and uses a UINavigationController as its RootViewController. My goal with it is:
Disable the normal iOS StatusBar ( I know how to do that and already did it )
Have a semi-transparent StatusBar (a view) above the UINavigationBar, so that I can show custom information on it
Parts of the content of my main view must be visible underneath my custom StatusBar (exactly like it works with the normal UIStatusBar, just that I don't want the clock and battery and want to show my own information on it)
How can I best achieve this?
A quick search on GitHub gave me multiple libraries that offer the exact functionality you are looking for.
MTStatusBarOverlay
KGStatusBar
CWStatusBarNotification
FDStatusBarNotifierView
BWStatusBarOverlay
WTStatusBar
TWStatus
Try them out, test them and see which one is best for you.
If none of them are good enough, you should get an idea on how to achieve this functionality using the source code those libraries provide.
iOS 7 Human Interface Design, page 143 says:
Don’t create a custom status bar. Users depend on the consistency of
the system-provided status bar. Although you might hide the status bar
in your app, it’s not appropriate to create custom UI that takes its
place.
iOS Human Interface Guidelines

Resources