2

I am making an iOS App and I wanted to have the status bar show up for a few seconds, display a message, then change bac to the normal status bar. Is there a solution for this in the sdk? Has anyone created anything for this?

5 Answers 5

6

Here's a Github project that will let you display custom text instead of the status bar. It's based on the Mailbox app, which uses the status bar to display mail sync messages. Personally I was surprised that the app review team let Mailbox past with this functionality intact, but they did.

https://github.com/kevingibbon/KGStatusBar

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Review shouldn't be a problem. The application is not required to have status bar visible.
1

I found another one that I have used.

https://github.com/online204/StatusBarNotification

Comments

0

Use uiview animatewithduration. Good tutorial to start: http://www.raywenderlich.com/2454/how-to-use-uiview-animation-tutorial

Example:

[UIView animateWithDuration:0.5 delay:0.2 options:UIViewAnimationCurveEaseInOut animations:^{ [[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleBlackOpaque]; //display ur message } completion:^(BOOL finished) { [UIView animateWithDuration:0.5 delay:delay+1.5 options:UIViewAnimationCurveEaseInOut animations:^{ [[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleBlackOpaque]; } completion:^(BOOL finished) { //remove your message }]; }]; 

Hope helps you to start...

Comments

0

Here is my shot at the statusbar notification, derived from KGStatusBar but with less code and a simpler API.

Only 5 methods to do the work :

+ (void)showWithStatus:(NSString*)status barColor:(UIColor*)color andRemoveAfterDelay:(NSNumber *) delay; + (void)showWithStatus:(NSString*)status andRemoveAfterDelay:(NSNumber *) delay; + (void)showWithStatus:(NSString*)status andBarColor:(UIColor*)color; + (void)showWithStatus:(NSString*)status; + (void)dismiss; 

Have a look : http://alexiscreuzot.com/KAStatusBar/

Comments

0

An alternative solution is to display a secondary status bar underneath:

iOS: Create a secondary status bar for displaying in-app messages

hidden visible

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.