Reputation: 4302
I'm running code from xcode on my iPhone. The blue status bar, saying it has an connection to xcode, is allway there.
Does it have to be there, in order to program to the phone?
Is there a way to set the views bounds to the visible part of the screen? Maybe a way (or what is best practice) to update the visible bounds of the screen, when a change in the status bar occurs, so that it changes the bounds for all view controllers?
I hope this isn't a too trivial question, howeven i havn't been able to solve it by searching.
Upvotes: 1
Views: 723
Reputation: 18888
That blue notification bar is showing because you are sharing an internet connection with your computer. Not because you are connected to Xcode. Turn off your Personal Hotspot in your devices settings.
On your device navigate to: Settings > Cellular > Turn off Personal Hotspot
You can get the height of the status bar like so:
UIApplication.sharedApplication().statusBarFrame.size.height
Using Auto Layout to deal with any status bar changes would be easiest in my opinion. Pin
your UIView
to the bottom of your status bar in Interface Builder.
Upvotes: 1
Reputation: 6893
Select the View Controller and uncheck the box saying "Under the Topbar". That way your views should not go under the status bar, but the blue bar in your screen shot is not because of the status bar as others have indicated.
Upvotes: 1
Reputation: 12109
To answer your first question: No, the blue bar does not have to be there. In fact, it is not related to Xcode in any way, it just says, that your computer uses the internet connection of your iPhone. To turn this off, go to Settings>Personal Hotspot and switch it off.
Upvotes: 0