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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:44:34+00:00 2026-05-20T21:44:34+00:00

Hai, I have created a tab based iRestaura project. I use 5 tab bar

  • 0

Hai,
I have created a tab based iRestaura project. I use 5 tab bar items. One of the tabbar name is Customer. When I tap on customer another tabbar is created with 3 viewcontroller programmatically. When I use view didload method tabbarcontroller is created successfully. But when i use view didAppear then tabbar controller is not created tabbar. In both of cases the other three viewcontroller which is created programmatically , there is not view did appear is not working. But all of case I need to use viewDidAppear method .
Plz anyone can help me…
The viewDidAppear method which not working is given bellow …..

- (void)viewDidAppear:(BOOL)animated 
{
    [super viewDidAppear:animated];
    UITabBarController *tabBarController1=[[UITabBarController alloc] init];

    CustomerListViewController *customerListViewController=[[CustomerListViewController alloc] init];
    customerListViewController.title=@"Customer List";
    UIImage *anImage1 = [UIImage imageNamed:@"customer.png"];
    UITabBarItem *theItem1 = [[UITabBarItem alloc] initWithTitle:@"CustomerList" image:anImage1 tag:0];
    customerListViewController.tabBarItem = theItem1;


    SelectedCustomerViewController *selectedCustomerViewController= [[SelectedCustomerViewController alloc] init];  
    selectedCustomerViewController.title=@"Selected Customer";
    UIImage *anImage3 = [UIImage imageNamed:@"selectedCustomer.png"];
    UITabBarItem *theItem = [[UITabBarItem alloc] initWithTitle:@"Selected Customer" image:anImage3 tag:1];
    selectedCustomerViewController.tabBarItem = theItem;

    InvoiceListViewController *invoiceListViewController=[[InvoiceListViewController alloc] init];
    invoiceListViewController.title=@"Invoice List";
    UIImage *anImage2 = [UIImage imageNamed:@"invoiceNo.png"];
    UITabBarItem *theItem2 = [[UITabBarItem alloc] initWithTitle:@"Invoice List" image:anImage2 tag:2];
    invoiceListViewController.tabBarItem = theItem2;

    NSMutableArray *controllers=[[NSMutableArray alloc] init];
    [controllers addObject:customerListViewController];
    //  [controllers1 addObject:vc1];
    [controllers addObject:selectedCustomerViewController];

    [controllers addObject:invoiceListViewController];
    ///[controllers1 addObject:vc4];
    tabBarController1.viewControllers=controllers;

    [self.navigationController setNavigationBarHidden:YES animated:YES];
    [[self view] addSubview:tabBarController1.view];
    for (int t=0; t<[controllers count]; t++)
    {
        NSLog(@"controller%@",[controllers objectAtIndex:t]);
    }

}
  • 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-20T21:44:35+00:00Added an answer on May 20, 2026 at 9:44 pm

    Try this:

    Firstly use the below function on your Tabbar controller .m file:

    - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
    {
        [viewController viewWillAppear:YES];
    }
    

    And in your “viewDidLoad” function of Tabbar controller .m file, use “localNavigationController.delegate = self;” as used in given example below.

    UserListing *nearBy = [[UserListing alloc] init];
    nearBy.tabBarItem.image = [UIImage imageNamed:@"icoTabNearby.png"];
    nearBy.tabBarItem.title = @"Nearby";
    localNavigationController = [[UINavigationController alloc] initWithRootViewController:nearBy];
    localNavigationController.delegate = self;
    

    Hope it works for you.

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

Sidebar

Related Questions

Hai Friends, I have implemented tab Listener, when i am clicking on the tabs
Hai Friends, I have created an sample application, in which i have a list
hai every one. i am new to android. in my project i had some
Hai, I have create a iPhone project where I need to show the current
Hai Techies, I have some stored procedure which was written in SQL server.Now i
I have used this in my HTML: <q> Hai How r u </q> Which
Hai I have developed a standalone application in which when an user logs in,
Hai I have an application which is designed in netbeans6.0.1 where i need to
Hai Thanks for everything. I have successfully implemented clean URL in local. Very nice
Hai I have An XDocument .All nodes in this document have an attribute UserId.

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.