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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:14:02+00:00 2026-06-08T05:14:02+00:00

I have a tab bar based app. But from one screen the user may

  • 0

I have a tab bar based app.
But from one screen the user may go to a more detailed view which does not have the tab bar.

The detailed screen has a navigation bar at the top and a simple button on the right as part of the navigation bar which works. ( I have created the navigation bar and the right button within Bar Button Item in IB and attached it to the outlets)

However since I have to go back from this screen I like to add the STANDARD back button using the standard navigation bar. (I could add it manually in IB, but I do not have the standard image readily available and thought using the standard would be “smarter”)

This is where I create the detail view (which is SettingsVC2) within SettingsVC1 :

SettingsVC2 *settingsVC2 = [[SettingsVC2 alloc] initWithNibName:@"SettingsVC2" bundle:nil selectedTCNumber:tcNumber];
settingsVC2.delegate = self;
UIBarButtonItem *temporaryBarButtonItem = [[UIBarButtonItem alloc] init];
temporaryBarButtonItem.title = @"Back";
settingsVC2.navigationItem.backBarButtonItem = temporaryBarButtonItem;
settingsVC2.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentViewController:settingsVC2 animated:YES completion:nil];   

While the navigation bar itself appears in SettingsVC2 no back button appears in it.

This is the code within SettingsVC2 itself:

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil selectedNumber: (NSInteger) numberx
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.tabBarItem.image = [UIImage imageNamed:@"settings"];
        self.view.backgroundColor = [UIColor whiteColor];
        self.tableView.opaque = TRUE;

        navBar.tintColor = [UIColor colorFromRGBIntegers:W_COLOR_R green:W_COLOR_G blue:W_COLOR_B alpha:W_COLOR_A];
        navBar.topItem.title =  NSLocalizedString(@"Settings2", @"Settings2");

        UIBarButtonItem *temporaryBarButtonItem = [[UIBarButtonItem alloc] init];
        temporaryBarButtonItem.title = @"Back";
     /*
        self.navigationItem.backBarButtonItem = temporaryBarButtonItem;
        [self.navigationItem.backBarButtonItem setEnabled:YES];
        [self.navigationItem.backBarButtonItem setStyle:UIBarButtonItemStyleDone];
      */
        navBar.topItem.backBarButtonItem = temporaryBarButtonItem;
    }
    return self;
}

Neither this code nor the code commented out makes the back button appear.

Is there a “standard” way to get the back button (without using a UINavigationController in my case) or do I have to just add it manually in the IB and get the appropriate background image?

Many thanks!

  • 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-08T05:14:05+00:00Added an answer on June 8, 2026 at 5:14 am

    You have to add the backbuttonItem to the first view, not the second one. This if course is very confusing. Anyway, I use these two methods to set and clear that back button title:

    - (void)defaultBackButtonTitle
    {   
        UIBarButtonItem *temporaryBarButtonItem = [UIBarButtonItem new];
        [temporaryBarButtonItem setTitle:@"Back"];
        self.navigationItem.backBarButtonItem = temporaryBarButtonItem;
    }
    
    - (void)clearBackButtonTitle
    {   
        self.navigationItem.backBarButtonItem = nil;
    }
    

    You call the first when you push the viewController you want to have the back button, and the second when you get viewWillAppear (in the first top view controller).

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

Sidebar

Related Questions

I have an app based on a tab bar and data retrieved from the
My app is based on a tab bar architecture. In order to have an
I have a tab bar + navigation based app and I'd like to launch
I have a tab bar based application in which I am trying to add
I have tab based application which also have Navigation controllers, When the user in
I am having an issue: I have a tab-bar based app. In MainWindow.xib for
I am creating app based on UTabbarController. I have creates that tab bar programmatically.
I was trying to create a tab bar based application from scratch but I'm
I have a tab bar controller in the master view of a split view
I have a tab-bar and navigation controller application (like Youtube app or Contacts app).

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.