In iOS can you guarantee the status bar is hidden? - ios

I'm using React Native. I haven't done iOS stuff in a while, I remember in the pre React Native days (or rather, older versions of iOS) you didn't have as much control over the status bar. But now, it's easy-pz. I can easily get rid of it.
The reason I'm asking is because if I can guarantee it's gone, I don't see why keep it all, and I'll just use the space to move the nav bar up and give more space to the content.
Perhaps someone would like to enlighten me.

Yes, you have a complete control over the status bar.
You can easily hide it.
Check the docs here for more information on the matter.

simple add this to your render function:
<StatusBar hidden={true}/>

Related

Update status bar text colour in real time as view changes

This might be a beginner question, but I noticed something interesting in the new Apple Music app. When switching from one view to another, the status bar text colour seems to change in real time rather than all at once when the next view loads.
Check out this screen recording to see what I mean:
http://f.cl.ly/items/2A0a3Q3i2O2d2O3u3q1m/statusBar_1.mp4
Closeup: http://f.cl.ly/items/182r3n3Z1m1y0y1W0j2J/statusBar_2.mov
How would I achieve this same effect? For instance, when transitioning to another view controller modally, how would I get the status bar style to change dynamically like this rather than when the next view loads? Is it even possible? Is Apple using some private API, or is it just a really simple trick I'm missing? Sorry if this is a beginner question, but I don't think I've ever seen another app do this.
Nothing you’re missing—there’s definitely no API to do that. I’ve seen a couple of third-party apps do something similar, probably by finding the status bar window, snapshotting it, and doing clever things with the resulting image, but that’s pretty fragile. As always, if you’d like an API for something, you should file an enhancement request.

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

AlertView? Alert? What is it?

I've seen some cool looking "windows" / "alerts" /whatever they are called. I wish I knew. Here's some examples of them:
These shouldn't be Apple exclusive, since I've seen 3rd party apps use them! I'd like to know what are these windows?
It Custom UIActivityIndicator that you can found in this link
https://github.com/jdg/MBProgressHUD
MBProgressHUD is an iOS drop-in class that displays a translucent HUD with an indicator and/or labels while work is being done in a background thread. The HUD is meant as a replacement for the undocumented, private UIKit UIProgressHUD with some additional features.......
For mor information go to above Link
Thanks :)
These is not apple specific controls. You can create them.
The pop up shown in first image is very easy to make. You'll have to use 3 controls to make it.
Background UIImageView with the image.
UIActivityIndicatory
UILabel with whatever message you want to display.
You just have to load this UIImageView and Animate the UIActivityIndicatory to get this pop up. I've used these pop up in a lot of apps Apple don't object this.
Your first view is a UIProgressHUD. Original Apple HUD is in a private API and it is not recommended to use it.
http://cocoadev.com/wiki/UIProgressHUD
However, numerous implementations have appeared that emulate the original HUD. For one, have a look here:
https://github.com/y0n3l/LGViewHUD
though I am sure Google will give you a dozen similar implementations.

Hiding Status Bar in iOS with Actionscript/Flash Builder

I've been playing around with trying to remove the status bar in iOS while compiling with Flash Builder. The problem is that I need the status bar to be there sometimes, but only during certain views does it go away, so just setting the true in the application xml file will not work.
I've also tried using stage.displayState = "fullScreen", and stage.displayState="normal". This works in the emulator, but when I test on the actual device, the stage.displayState never changes from its original state.
Anyone know of a way to do this, or if it's even possible using Flash Builder?
If not directly through actionscript, does anyone know of an ANE (air native extension) that would be able to toggle the status bar for both iOS and Android?
Also, for more information, I'm using Flex 4.6/AIR 3.4 SDK.
Thanks!
I know this is really late, but for anyone still looking for a solution to this issue, there is an ANE that allows you to do this. https://github.com/sharkhack/IOSStatusBarAne
To use it, simply call com.azer.IOSApplicationSettings.Settings::StatusbarHidden("YES");

How to make a glowing bar effect in iOS like the one used when personal hotspot is on?

I'd like to use this effect (not necessarily blue) when I'm synching my app to my server. I've searched the interwebs and apple dev forums but to no avail.
Another way to do this (though it gives you very little control over how the double status bar looks) is to simulate an audio session. See the following question & answer: SBStatusBarController instance
There is no way to do this nicely as Apple does this. There are two ways to do at least something close to this:
You can try to set status bar style to UIStatusBarStyleBlackTranslucent and plea a little bit with background images under the status bar that will affect a color a little bit.
You can take a look through the code by following links — http://www.cocoabyss.com/uikit/custom-status-bar-ios/ and https://github.com/myell0w/MTStatusBarOverlay/ this two code samples implements an overlay above the status bar that fools a user. Achieved result maybe pretty close to what you show in your screenshot.

Resources