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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:47:54+00:00 2026-06-09T04:47:54+00:00

I want to show 3 different screens depending on the option user selects They

  • 0

I want to show 3 different screens depending on the option user selects

screen where i have 3 options

They are 1. Type Prescription 2.Scribble Prescription 3. Prescription Form

How can i switch views for those 3?

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-09T04:47:55+00:00Added an answer on June 9, 2026 at 4:47 am

    UITabBarControllers like SplitViewControllers were intended to only be the Root View Controller and hence you cannot nest a TabBarController in another view, but you can however nest a UITabBar in a view.

    I added the Tabbar to the details view at the bottom, a Navigation bar at the top and then a placeholder view between them. All in Interface Builder!, You will want to switch everything on with the autosize on the Placeholder view.

    Next, Implement the UITabBarDelegate, you will need:

    - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item {
    

    from that you can use item.tag which if you give each item a unique tag in Interface Builder will let you know which tab the user clicked. I setup defined values for mine:

    #define VIEW_TAB_A 0
    #define VIEW_TAB_B 1
    #define VIEW_TAB_C 2
    

    Then you will then want to…

    - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item {
    [self switchToView:item];
    

    }

    - (void) switchToView : (UITabBarItem*) item {
    
        if( currentViewController != nil ) {
            [currentViewController viewWillDisappear:NO];
            [currentViewController.view removeFromSuperview];               
        }
    
    switch(item.tag) {
        case VIEW_TAB_A:
            currentViewController = self.viewA;
            break;
        case SCAN_VIEW_TAB_B:
            currentViewController = self.viewB;
            break;
        case PROMOTIONS_VIEW_TAB_C:
            currentViewController = self.viewC;
            break;
    }
    
    UIView *aView = currentViewController.view; 
    
    aView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    aView.frame = placeholderView.frame;
    
    [currentViewController viewWillAppear:NO];
    
    [self.view insertSubview:aView aboveSubview:placeholderView];
    if( currentViewController != nil ) {
        [currentViewController viewDidDisappear:NO];
    }
    [currentViewController viewDidAppear:NO];
    

    }
    These are my notes that i learned from a similar question, search harder next time

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

Sidebar

Related Questions

I want to show array objects at the same time in different 10 labels.
In my Rails controller I want to branch to a different controller's action, show
I want to show a border type look for an element but without using
I want to show two different activites of a single application into a single
I have my tabbar with 4 icons that show 4 different view controllers, depending
I want to show the message which asks the user if he accepts that
I want to prevent the user from maximizing the Windows Form to full screen
I want show an information page after success db opartions. And after the info
I want show annotation view (above one of my pin) after load map. For
hii I want show a pop up Dialog box when i click on to

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.