Note that there are some explanatory texts on larger screens.

plurals
  1. POViewDid appear not working xcode
    primarykey
    data
    text
    <p>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 .....</p> <pre><code>- (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&lt;[controllers count]; t++) { NSLog(@"controller%@",[controllers objectAtIndex:t]); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload