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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:46:56+00:00 2026-06-08T03:46:56+00:00

I’m making my first app. I use Xcode 4 with storyboard to get a

  • 0

I’m making my first app. I use Xcode 4 with storyboard to get a better picture of whats going on. The app starts (in the storybard) with a TabBarController with 4 tabs. Two of the tabs are navigation controllers with tableview systems, and the other two tabs are regular viewcontrollers.

I’ve made the TabBarController itself in the Storyboard only, not made a class for it or anything. So all the tabs are “running” at the same time in the app it seems, they remain unchanged when I enter another tab and back. It looks kind of unprofessional, and maybe bad for iphone too?

Now I want to make the left tab become unactive/reset to the RootViewController when another tab is entered.

In other words make some kind of delegate function for the TabBar so only the selected tab is active. Something like that. Correct me if I’m wrong, I’m just trying to make an understanding of what I need to do.

After what I understand after my research, all I have to make a property for the TabBar in the AppDelegate.h, synthesize it in AppDelegate.m then somehow make the TabBar’s delegate to AppDelegate (self ?) or something, that’s done in here somehow (AppDelegate.m):

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
//some statements.

then add something like this somewhere in the AppDelegate.m:

- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
//With some statements about the viewcontrollers

But as you see I’m not very experienced with coding, and I can’t find a tutorial/guide I understand because they use xibs etc.. So can someone please help me make this function? I will need code examples to understand how to do it, if you only describe the process in words it will just make lots of new questions for me if you understand what I mean.

The classes that reprecent the 4 tabs (the 2 tableviews and the 2 views) let’s call them:

FirstTableViewController, SecondTableViewController, FirstViewController, SecondViewController

I dont know if it’s enough to make this function in the AppDelegate, or if I have to make a class (.h/.m) for the TabBar, add codes in the different ViewControllers classes etc.

I hope someone can help me do this in the most easy and correct way, I’m sure many others bounce into this dilemma in their beginner stage of app development and will find the answer to this very useful.

Thank you for your help.

  • 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-08T03:46:59+00:00Added an answer on June 8, 2026 at 3:46 am

    This is the behavior that Apple intended and users expect from a tab bar based application. It allows you to view different areas of an application without losing where you are.

    However, if, under certain circumstances, you want to reset a view controller back to its original state, you can do this in viewWillAppear of a given view controller.

    If you want to handle this via the app delegate & tab bar controller’s delegate methods, you have the reference to the tab bar after your Storyboard / XIB has loaded. Just use:

    rootViewController.tabBarController.delegate = self inside of your app delegate.

    Alternatively, you can change the class of tabBarController to your own custom class in the storyboard by selecting the tab bar controller in the objects list on the left pane and going to the identity inspector, changing the class from UITabBarController to a custom subclass.

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

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am writing an app with both english and french support. The app requests

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.