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

  • SEARCH
  • Home
  • 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 6738713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:24:05+00:00 2026-05-26T11:24:05+00:00

I can draw an image into the navbar by adding this to the bottom

  • 0

I can draw an image into the navbar by adding this to the bottom of my delegate.m class.

@implementation UINavigationBar (UINavigationBarCategory)
- (void)drawRect:(CGRect)rect 
{
UIImage *img  = [UIImage imageNamed: @"nav_bar.png"];
[img drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];   
}
@end

This works great so far, but I would like to have some global BOOL var i can set from all my other viewControllers so I can change the navbar when needs be.

Does anybody know of a good solution? Is there a way to set some global var that all classes can see and that I can reference from with the above method?

Cheers,
-Code

  • 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-26T11:24:05+00:00Added an answer on May 26, 2026 at 11:24 am

    Assuming you have a global bool in your app delegate

    @property (nonatomic, assign) BOOL globalBool;
    

    You can access your application delegate from any class in your app like this

    id appDelegate = [[UIApplication sharedApplication] delegate];
    
    BOOL gloBalBool = [appDelegate globalBool];
    

    and set the global bool variable

    [appDelegate setGlobalBool:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how can I draw into an existing UIImage using monotouch? I load an image:
Any idea how I can draw Bullet Points using Flex? instead of using image
I can draw many things using this : NSString *imagePath = [[NSBundle mainBundle] pathForResource:@dummy2.png
I want to divide the window into 2 parts. Each part I can draw
the pixman image library can draw radial color gradients between two circles. I'd like
I'm using Graphics2D.drawImage to draw an image into a BufferedImage. Then I Use ImageIO.write()
I want to read an image into MATLAB, draw a rectangle on it, and
I'm trying to render some UIImages into 1 single image that I can save
I'm attempting to create a ListView where I can draw some basic shapes into
In Visual studio I can draw 13 different application-icons in different resolutions and color

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.