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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:29:26+00:00 2026-06-14T16:29:26+00:00

I have a detailview with a navigation bar with a back button and a

  • 0

I have a detailview with a navigation bar with a back button and a name for the view.
The navigation bar is set programmatically.
The name presented is set like this.

self.title = NSLocalizedString(name, @"");

The name depends on the presented view.

Now I would like to also present a small icon on the navigation bar which also is depends on the view.

How do I do that?

  • 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-14T16:29:27+00:00Added an answer on June 14, 2026 at 4:29 pm

    You can set backGround image to navigationBar Using this

    Put in didFinishLaunchingWithOptions

    [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"title_bar.png"] forBarMetrics:UIBarMetricsDefault];  
    

    Or you can set navigation bar image in any view using

    UINavigationBar *navBar = [[self navigationController] navigationBar];
        UIImage *image = [UIImage imageNamed:@"TopBar.png"];
        [navBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
    

    Or you can set a view on your NavigationBar Link

    [[UINavigationBar appearance] addSubview:yourView]; 
    

    or

    self.navigationItem.titleView = YourView;  
    

    And set title using h

    self.navigationItem.title = @"Your Title"; 
    

    And you can get navigationBarButton using this

    -(void)getRightBarBtn
    {
        UIButton *Btn =[UIButton buttonWithType:UIButtonTypeCustom];
    
        [Btn setFrame:CGRectMake(0.0f,0.0f,68.0f,30.0f)];
        [Btn setBackgroundImage:[UIImage imageNamed:[NSString stringWithFormat:@"yourImage.png"]]  forState:UIControlStateNormal];
        //[Btn setTitle:@"OK" forState:UIControlStateNormal];
        //Btn.titleLabel.font = [UIFont fontWithName:@"Georgia" size:14];
        [Btn addTarget:self action:@selector(yourBtnPress:) forControlEvents:UIControlEventTouchUpInside];
        UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithCustomView:Btn];
        [self.navigationItem setRightBarButtonItem:addButton];
    }
    

    And set simple imageView on navigation Bar

    UIImageView *image = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"star.png"]];
    UIBarButtonItem *backBarButton = [[UIBarButtonItem alloc] initWithCustomView:image];
    self.navigationItem.rightBarButtonItem = backBarButton;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have built view controller with xib file and navigation bar in it,this view
I have a UITabBar in the detail view of my navigation based application. I
I have a detailview page, and on top of it the title lable appears
I have view page with both detailview and gridview the grid view should be
I have a button called Download page at the bottom of my detailView of
I have this problem, I've got a navigation-based application, and on the one of
I have a UISplitViewController that is set up like so: -(IBAction)makeStory:(id)sender{ NSLog(@makeStory:); makeStoryTableViewController =
I have the following in the mainwindow.xib Navigation Controller List item Tab bar controller
I have a mutable Array in a Tableview, this is populated on View did
I have a tab bar application and when I display a modal view controller,

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.