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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:36:12+00:00 2026-05-30T10:36:12+00:00

I have root ViewController and detailed ViewController. When i push to detailedViewController i get

  • 0

I have root ViewController and detailed ViewController. When i push to detailedViewController i get leftBarButtonItem with the title from the root one. But i want the title to be just “Back”, nothing more. So how to do that?

This doesn’t help

self.navigationItem.leftBarButtonItem.title = @"Back";

To create my on type barButtonItem(for example 104 with left arrow) and to set it to leftBarButtonItem is terrible decision.

Is there other way than to change the title of the rootViewController manually before pushing?

  • 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-30T10:36:13+00:00Added an answer on May 30, 2026 at 10:36 am

    From Apple’s doc:

    backBarButtonItem

    The bar button item to use when a back button is needed on the
    navigation bar.

    @property(nonatomic, retain) UIBarButtonItem *backBarButtonItem
    Discussion

    When this navigation item is immediately below the top item in the
    stack, the navigation controller derives the back button for the
    navigation bar from this navigation item. When this property is nil,
    the navigation item uses the value in its title property to create an
    appropriate back button. If you want to specify a custom image or
    title for the back button, you can assign a custom bar button item
    (with your custom title or image) to this property instead
    . When
    configuring your bar button item, do not assign a custom view to it;
    the navigation item ignores custom views in the back bar button
    anyway.

    So, you can create create your barButtonItem (e.g. – initWithTitle:style:target:action:) and assign it to that property.

    In addition, if you want to have a custom image for UIBarButtonItem (left or right) I suggest you to create a category extension like the following:

    //UIBarButtonItem+Extension.h    
    + (UIBarButtonItem*)barItemWithImage:(UIImage*)image title:(NSString*)title target:(id)target action:(SEL)action;
    
    //UIBarButtonItem+Extension.m    
    + (UIBarButtonItem*)barItemWithImage:(UIImage*)image title:(NSString*)title target:(id)target action:(SEL)action
    {
        UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
        button.frame = CGRectMake(0.0, 0.0, image.size.width, image.size.height);
        button.titleLabel.textAlignment = UITextAlignmentCenter;
    
        [button setBackgroundImage:image forState:UIControlStateNormal];
        [button setTitle:title forState:UIControlStateNormal];
        [button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
    
        UIBarButtonItem* barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
    
        return [barButtonItem autorelease];    
    }
    

    and then use it as

    UIBarButtonItem* backBarButtonItem = [UIBarButtonItem barItemWithImage:[UIImage imageNamed:@"YoutImageName"] title:@"YourTitle" target:self action:@selector(doSomething:)];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several types os root view controller that I want to instantiate one
I have freshly setup app, just with a window an a root view (from
I have a root view controller with just a simple navigation button that loads
I have a project in which the root viewcontroller call multi viewcontrollers. There is
I have a project in which, there is root viewcontroller and multi sub viewcontrollers.
I have the navigationcontroller based viewcontroller and I overriding the root view controller navigation
I have a root view controller with no nib file, I tried adding this
I have root view with both tab bar and navigation bar visible at the
I am using a machine on which I do not have root access and
I have a root UIViewController which has a property called webView. WebView is 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.