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 3482532
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:34:13+00:00 2026-05-18T10:34:13+00:00

In need a background image AND a title in my Navigation Bar. For the

  • 0

In need a background image AND a title in my Navigation Bar. For the image I write a category:

@implementation UINavigationBar(MyNavigationBar)
- (void)setBackgroundImage {
    UIImageView *aTabBarBackground = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"navBarBackgrd.png"]];
    [self addSubview: aTabBarBackground];
    [self sendSubviewToBack: aTabBarBackground];
    [aTabBarBackground release];
}
@end

I call this category in my AppDelegate and have background images in the whole application:

[navigationController.navigationBar setBackgroundImage]; 

Every ViewController has a title:

[self setTitle:@"MyTitle"];

But after setting the background image, I have a problem with the title.

In the first view every works, I see the background image and the title 🙂
But in the next view, the title disappears. Only the background image is visible. Maybe the title is under the image?

Technically it’s possible to show both. With this trick it works:

  1. Hide Navigation Bar BEFORE opening the next ViewController:

    [self.navigationController setNavigationBarHidden:YES];

  2. Show the Navigation Bar in the next ViewController:

    [self.navigationController setNavigationBarHidden:NO];

Now, image AND title are visible, but this solution isn’t the best 😉

  • 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-18T10:34:14+00:00Added an answer on May 18, 2026 at 10:34 am

    I got it!

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

    See Background image for navigation view

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

Sidebar

Related Questions

I need to create a fading background image that stretches to fill the browser.
Possible Duplicate: Android Button: set onClick background image change with XML? I need that
i need to set image as background in android gridview. I have code which
I have an image with transparence background, for example image . I need to
I'm drawing an image using rgb pixel data. I need to set transparent background
I need to select each list item and change the background image of the
I need to switch my element background image beetwin two images on every click
I need to place two repeated background images on the left and right border
I need to print report page that has couple of background images on it.
what I need: - there are two images: a background (large) and a proifile

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.