Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5994111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:46:19+00:00 2026-05-22T23:46:19+00:00

Does Apple not allow developers to add an icon into a status bar? I

  • 0

Does Apple not allow developers to add an icon into a status bar?

I followed code from a book. The code is simple:

@interface UIApplication (extended) 
- (void) addStatusBarImageNamed:(NSString *)aName; 
- (void) removeStatusBarImageNamed:(NSString *)aName; 

@end 

- (void)performAction{
    if (xxx) {
        [[UIApplication sharedApplication]addStatusBarImageNamed:@"Default_EN.png"];
    }
    else {
        [[UIApplication sharedApplication]addStatusBarImageNamed:@"Default_EC.png"];

    }
}

But it gives the following feedback :

-addStatusBarImageNamed: is deprecated. Doing nothing.

What can I do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:46:20+00:00Added an answer on May 22, 2026 at 11:46 pm

    In Classes/YourViewController.m, the addStatusBarImageNamed:removeOnExit: method needs to be overwritten with this.

    - (void) addStatusBarImageNamed:(NSString*)image removeOnExit: (BOOL) remove {
    if(_statusbarimage!=nil && _responds) {
    if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"statusBarEnabled"] integerValue] == 1)
    [self removeStatusBarImageNamed:_statusbarimage];
    statusbarimage=image;
    }
    if (_responds) {
    if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"statusBarEnabled"] integerValue] == 1)
    [super addStatusBarImageNamed:image removeOnExit: remove];
    }
    }  
    

    See if it works fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found some private (undocumented) APIs but Apple does not allow apps to use
As far as I know, Apple does not allow bluetooth file sharing in iPhone/iPad.
Does Apple push use TCP or UDP to deliver messages from their servers to
Does anyone know what end user information a developer receives from Apple regarding a
The UITabBarController does not allow landscape orientation. So I used a subclass of UITabBarContoller
I'm working with a development platform (monotouch) that does not allow me to link
Is it true that Mathematica's Minimize function does not allow constraints like Mod[x,2]==0? I
The following method does not apply the wpf changes (background = red) until the
MSDN docs say that only value types need boxing, but this does not apply
This does not really apply to any language specifically, but if it matters I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.