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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:42:00+00:00 2026-06-03T09:42:00+00:00

I have customised the navigation controller title bar with a background image, but I

  • 0

I have customised the navigation controller title bar with a background image, but I am really struggling to change the background color of the back button to transparent so that it matches with the green title bar beneath it. I am fairly new to iOS development. Can any one suggest what could be done?

Here is the code for I used to change the title bar of navigation controller, just in case it helps:

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    if ([self.navigationController.navigationBar respondsToSelector:@selector(setBackgroundImage:forBarMetrics:)] ) {
        UIImage *image = [UIImage imageNamed:@"greenbar.png"];
        [self.navigationController.navigationBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
       // [[UIBarButtonItem appearance] setBackButtonBackgroundImage:image forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];

    } 

    //change back button image

}

EDIT: After doing a bit of research I managed to get what I wanted. Here is the code to change the background image for the back button:

 UIImage *image1 = [UIImage imageNamed:@"back-bt.png"];
    [[UIBarButtonItem appearance] setBackButtonBackgroundImage:image1 forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];

The above code adds the image to all the back buttons in the navigation controller.

  • 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-06-03T09:42:02+00:00Added an answer on June 3, 2026 at 9:42 am

    You can’t change the appearance of the default back button, but you can create your own button to replace it.

    - (void)viewDidLoad {
    
        [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
        if ([self.navigationController.navigationBar respondsToSelector:@selector(setBackgroundImage:forBarMetrics:)] ) {
            UIImage *image = [UIImage imageNamed:@"greenbar.png"];
            [self.navigationController.navigationBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
           // [[UIBarButtonItem appearance] setBackButtonBackgroundImage:image forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
    
        } 
    
        //change back button image
        if(self.navigationController.viewControllers.count > 1) {
            UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];
    
            [backButton setTitle:@"Back" forState:UIControlStateNormal];
            [backButton addTarget:self action:@selector(didTapBackButton:) forControlEvents:UIControlEventTouchUpInside];
            backButton.frame = CGRectMake(0.0f, 0.0f, 64.0f, 41.0f);
            UIBarButtonItem *backButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backButton];
    
            self.navigationItem.leftBarButtonItem = backButtonItem;
        }
    }
    
    
    
    - (void) didTapBackButton:(id)sender {
        if(self.navigationController.viewControllers.count > 1) {
            [self.navigationController popViewControllerAnimated:YES];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have customised my SeekBar - I use a custom image as the background,
Trying to customize my back button in a drilldown navigation controller. On my one
I have a View With UINavigationBar Navigation Bar only permits me the button at
I have implemented this code in appDelegate in order to costumize navigation bar back
I like a dark background when coding and have customised it to a scheme
I have a iPhone app which uses TabBar in Navigation controller. I have a
I'm trying to change the navigation bar buttons of the UIImagePickerController. So far I
I have a concern about the separate line under navigation bar. Please take a
I have a barbuttonitem which i have customised using a custom button with an
In a customised form I would have a create Purchase Menubutton which opens a

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.