Touch ID dialog showing a second status bar - ios

When I let the user login into my app with Touch ID, I get the dialog (which by the way is very ugly and cannot be customized) and I also get a second status bar, which looks like this:
Is there any way to hide the status bar?
If not, set the status bar style to my style (UIStatusBarStyleLightContent)?
(I also would be very happy if someone knows of a way to customize the dialog, more than just changing labels)

i fixed this
just hide status bar when open touch id like this
[[UIApplication sharedApplication] setStatusBarHidden:YES];
not show after failure or success with perform selector with 1 sec delay like this and my code working perfectly
[[UIApplication sharedApplication] setStatusBarHidden:NO];

Did you see this behaviour on iPhone 6/6+ ?
If yes, the way I solved it was by setting the appropriate launching xib so that iPhone 6 and 6 plus devices are using the native resolution without being scaled. (see also this question on how to do that How to enable native resolution for apps on iPhone 6 and 6 Plus? )

Related

iOS 9 Hide status bar back button

Is there any way to hide new status bar back button introduced in iOS9? I mean the button that is visible after launching application by [UIApplication openURL:].
Every time you use [UIApplication openURL:] iOS9 will generate the back button to the previous app. This feature is added to enable quick jumping from app to app.
Apple made this private and developers are not allowed to enable or disable this option. Hopefully next versions of iOS will make this not so comfortable feature optional.

iOS 7 red status bar

When Shazam is opened the status bar turns red and doubles it's height because of background recording, but this ruins the UI in my app. I'm now trying to change my code to support different status bar sizes, because the red status bar is also opaque, but I can't come up with a general solution because of this:
When the status bar is initially red, when I launch my app, the launch image is scaled and ruined. How to fix this?
Note: My app does NOT use recording.
[Edit]
The only solution I found was to set 'Status bar is initially hidden' to YES in .plist. I don't really need the status bar to be visible on app launch, especially if it affects my launch image when the status bar is taller than usual, i.e. when recording or during a phone call.
[Edit 2]
There are cases when the launch image will be briefly visible when the app is brought to foreground from background state. To work around this I use view-controller based status bar appearance:
- (BOOL)prefersStatusBarHidden
{
if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground)
{
return YES;
}
return NO;
}
This ensures the status bar is always hidden when the app comes to foreground, so the launch image will never be affected. Don't forget to call setNeedsStatusBarAppearanceUpdate on appDidEnterBackground and (inside an animation block) on appDidBecomeActive notifications.
The red status bar is a system function. You are not going to be able to work around this - and it isn't really your 'fault' if the launch screen looks like that - if the user wants to open your app while using Shazam, they are going to see the red bar and the launch image is going to be scaled. You could change the launch image to look good when scaled, but then it would look bad the rest of the time (when the red bar wasn't at the top of the screen on launch).
After a long long long long long research and hurdles I found out simple solution for this follow as below
In Targets->General->Deployment Info check the HideStatusBar Option
like below!
And in the ViewController (Which one you kept as RootViewController) in viewDidAppear add this line of code...
[[UIApplication sharedApplication] setStatusBarHidden:NO];
Because when you uncheck HideStatusBar Option and your app needs any background process or audio related process then the status bar will become red with enlarged height. If you dont want status bar in entire app then dont add the above line in viewDidAppear and check HideStatusBar Option.

Will apple store accept my custom status bar which will show for a moment in iphone?

I developing a card swipe reader like application when I connect the device via audiojack in my iphone I want to show a message "device connected" in status bar which will be a custom status bar looks similar to original status bar and hide the original status bar. After few seconds it will show back the original status bar. Will apple store allow this or there any issue in it?
Reeder for iPhone does that when syncing feeds. See the first screenshot in this article.
So I guess it's ok with Apple.
If you use your status bar and hides default status bar apple will not reject. Because you are hiding default status bar(which is accepatable in HIG) and then displaying your custom status bar.
Hope it helps you.
I recommend when doing so, don't make your custom status bar as exact copy of iOS default status bar. Make some changes in it, like change battery charging icon, change Network Availability indicator etc.

How do I turn on iphone screen programmatically when it's dimmed [duplicate]

This question already has answers here:
Is there a way of adjusting the screen brightness programmatically?
(3 answers)
Closed 9 years ago.
Before iphone lock the screen, it will dim the screen first for a while. I wonder how to lighten the screen in my app at that time without touching the screen. Can anyone give a help?
To be more specific: I don't want to prevent the system sleep, nor adjust the screen brightness. What I want is to lighten the screen when I got a certain event to notice the user while the screen is dimmed.
Just solve this problem in a tricky way..
- (void)lightenTheScreen
{
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
[[UIApplication sharedApplication] setIdleTimerDisabled:NO];
}
That is default behavior of the iPhone. To prevent that nature you can use following code.
[[UIApplication sharedApplication] setIdleTimerDisabled: YES]; //Add this at the end in your applicationDidFinishLaunching application
From APPLE DOCUMENTATION
"The default value of this property is NO. When most applications have
no touches as user input for a short period, the system puts the
device into a "sleep” state where the screen dims. This is done for
the purposes of conserving power. However, applications that don't
have user input except for the accelerometer—games, for instance—can,
by setting this property to YES, disable the “idle timer” to avert
system sleep. "

UIApplication removeStatusBarImageNamed doesn't work

i'm working on a jailbroken iphone with iOS 5.0.1, just want to access status bar image,
and my code is as follows:
-(void)addStatusBarImage
{
NSLog(#"addStatusBarImage");
[[UIApplication sharedApplication] addStatusBarImageNamed:#"sgtest" removeOnExit: YES];
}
-(void)removeStatusBarImage
{
NSLog(#"removeStatusBarImage");
[[UIApplication sharedApplication] removeStatusBarImageNamed:#"sgtest"];
}
my problem is, the add function works fine, but removeStatusBarImageNamed seems useless as the "sgtest" image still exists in the status bar unless my app is terminated.
status bar icon manager fix what thread have had set icon image. if another thread try to remove that icon, it fails. You need to do it in one thread.
Check out SpringBoardAccess project at github. You can use it as is or implement like.

Resources