Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:5];
- self.detailsController= [[PostDetailsViewController alloc] initWithNibName:@"PostDetailsView" bundle:nil];
- self.detailsController.title = @"Details";
- self.detailsController.tabBarItem.image = [UIImage imageNamed:@"write.png"];
- self.detailsController.postController = self;
- [array addObject:self.detailsController];
- self.photoController = [[PostPhotosViewController alloc] initWithNibName:@"PostPhotosView" bundle:nil];
- self.photoController.title = @"Photos";
- self.photoController.tabBarItem.image = [UIImage imageNamed:@"photos.png"];
- self.photoController.postController = self;
- [array addObject:self.photoController];
- tabController.viewControllers = array;
- self.view = tabController.view;
- tabController.delegate = nil;
- tabController.selectedIndex = 1;
- tabController.selectedIndex = 0;
- tabController.delegate = self;
- self.photoController.tabBarItem.badgeValue = @"1";
Add Comment
Please, Sign In to add comment