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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:59:44+00:00 2026-05-24T06:59:44+00:00

So, right now I had created a view-based application with 8 different views. I

  • 0

So, right now I had created a view-based application with 8 different views. I want it to show a tab bar on 3 of the views. This tab bar would have 3 items, which will allow the user to switch to the 3 said views.

How should I go about doing so? Thanks a lot.

AppDelegate.h

@interface LoginPageAppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate> {
    UIWindow *window;
    LoginPageViewController *viewController;
    UITabBarController *tabBarController;

}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet LoginPageViewController *viewController;
@property (nonatomic, retain) IBOutlet IBOutlet UITabBarController *tabBarController;


@end

AppDelegate.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    tabBarController = [[UITabBarController alloc] init];
    tabBarController.delegate=self;

    RequestPage* requestPage = [[RequestPage alloc] init];  
    UIViewController *RequestPageView = [[UIViewController alloc] initWithRootViewController:requestPage];  

    StatusPage* statusPage = [[StatusPage alloc] init];  
    UIViewController *StatusPageView = [[UIViewController alloc] initWithRootViewController:statusPage];  
    NSArray* controllers = [NSArray arrayWithObjects:RequestPageView, StatusPageView, nil]; 
    tabBarController.viewControllers = controllers;

    [window addSubview:tabBarController.view];        

    [self.window makeKeyAndVisible];

    return YES;
}

RequestPage.m

- (id)init {
    self.title = @"Request Page";
    UIImage* anImage = [UIImage imageNamed:@"3.png"];
    UITabBarItem* theItem = [[UITabBarItem alloc] initWithTitle:@"Request Page" image:anImage tag:2];
    self.tabBarItem = theItem;
    [theItem release];
    return self;
}
  • 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-24T06:59:44+00:00Added an answer on May 24, 2026 at 6:59 am

    You need to start with view based application. And then create a UITabbarController in you appDelegate file.

    Appdelegate.h

    UITabBarController *tabBarController;
    // set properties
    

    Appdelegate.m

    // Synthsize
    
    tabBarController = [[UITabBarController alloc] init];
    tabBarController.delegate=self;
    
    //Adding Search,Nearby,Map,AboutUs,Favorites Tabs to tabBarController  
    Search * search = [[Search alloc] init];  
    UINavigationController *searchNav = [[UINavigationController alloc] initWithRootViewController:search];  
    
    Nearby* nearby = [[Nearby alloc] init];  
    UINavigationController *nearbyNav = [[UINavigationController alloc] initWithRootViewController:nearby];  
    
    Map* map = [[Map alloc] init];  
    UINavigationController *mapNav = [[UINavigationController alloc] initWithRootViewController:map];  
    
    AboutUs* aboutUs = [[AboutUs alloc] init];  
    UINavigationController *aboutUsNav = [[UINavigationController alloc] initWithRootViewController:aboutUs];  
    
    Favorites* favorites = [[Favorites alloc] init];  
    UINavigationController *favoritesNav = [[UINavigationController alloc] initWithRootViewController:favorites];  
    
    NSArray* controllers = [NSArray arrayWithObjects:searchNav,nearbyNav,mapNav,aboutUsNav,favoritesNav, nil];  
    tabBarController.viewControllers = controllers;  
    
    [window addSubview:tabBarController.view];    
    

    You can accordingly manage in which tab you want to place navigation controller or only a view controller.

    Then in each of the view controllers mentioned above you need to implement

    - (id)init {}
    

    in which you can set Tab name and image.

    Update:

    - (id)init {
            self.title = @"Second";
            UIImage* anImage = [UIImage imageNamed:@"3.png"];
            UITabBarItem* theItem = [[UITabBarItem alloc] initWithTitle:@"Second" image:anImage tag:2];
            self.tabBarItem = theItem;
            [theItem release];
        return self;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to dynamically load modules I've created. Right now this works properly: import
This is getting extremely irritating. Right now I have a winforms application, and things
Right now I'm doing something like this: RewriteRule ^/?logout(/)?$ logout.php RewriteRule ^/?config(/)?$ config.php I
Right now, I have code that looks something like this: Private Sub ShowReport(ByVal reportName
I had this big problem . Now, I've refactored my code to have a
I am extremely busy right now. So, I cannot build plugins at this moment.
I had created a dynamic web project. AS of now it has a jsp
Right now I have an application that loads a bunch of thumbnail images into
Right now, I keep all of my projects on my laptop. I'm thinking that
Right now, I'm particularly interested in reading the data from MP3 files (ID3 tags?),

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.