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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:42:35+00:00 2026-05-27T03:42:35+00:00

I have a tab bar driven app. The app has some view controllers that

  • 0

I have a tab bar driven app.

The app has some view controllers that are stacked on each other the usual way.
Some of these view controllers may be top level – meaning instantiated directly from the tab bar controller. Those do not have a “back” button in their navigation bar.

Some of these can be called at many points within the call stack. Meaning they could be called from some other view controller and not directly from the tab bar.

I am looking for a smart way to determine programatically whether the current view controller currently has a “back” button in its nav bar or not.
(If it does not then I want to display some other bar item at that place.)

Any hint is appreciated. 🙂

  • 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-27T03:42:35+00:00Added an answer on May 27, 2026 at 3:42 am

    Well… from what you are describing, I can understand that you have a UITabBarController with a list of view controller in each tab, and each view controller is a navigation controller, which further leads to new views. And you are interested in finding if a particular view is the first view or the second view, and so forth.

    Interestingly, there is a way to do this. The navigation controller is basically a viewController array with views added to the index of the navigationController. The first view will be in index 0. If you perform a pushViewController, the newViewController is placed at index 1.

    Just check for the index count of the self.navigationController of that particular view. If it is greater than 1, you can be certain that it is not the initial view.

    You can also check for the backBarButtonItem property, but then again, it may not be needed. The viewControllers array count should do.

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

Sidebar

Related Questions

I have a tab bar app that has to display in different languages depending
I have a tab bar app that works. Each tab is a UINavigationController whose
In my app I have a tab bar. And in some views I as
My problem is that I want to have a tab bar view with its
I have a Tab bar App with four tabs. Each tab loads the same
I have a tab bar in may app that controls 5 different views. To
I have a tab bar app. One of the controllers is a preference page.
I have a Tab Bar with a navigation table view. My app crashes when
I have a tab bar controller with five buttons. That controller has a tab
I have a tab bar application with a navigation controller and view controllers inside

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.