Posted By

FumarMata on 09/10/11


Tagged

c navigation iphone objective ios


Versions (?)

Add / remove view controllers to tab bar controller


 / Published in: Objective C
 

  1. #import "RegisterViewController.h"
  2.  
  3. //
  4.  
  5. UIViewController *viewController3 = [[[RegisterViewController alloc] initWithNibName:@"RegisterViewController" bundle:nil] autorelease];
  6.  
  7.  
  8. NSMutableArray* controllers = [[self.tabBarController.viewControllers mutableCopy] autorelease];
  9. [controllers removeObjectAtIndex:1];
  10. [controllers insertObject:viewController3 atIndex:0];
  11. [self.tabBarController setViewControllers:controllers animated:YES];

Report this snippet  

You need to login to post a comment.