Guest User

Untitled

a guest
May 22nd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:5];
  2.  
  3. self.detailsController= [[PostDetailsViewController alloc] initWithNibName:@"PostDetailsView" bundle:nil];
  4. self.detailsController.title = @"Details";
  5. self.detailsController.tabBarItem.image = [UIImage imageNamed:@"write.png"];
  6. self.detailsController.postController = self;
  7. [array addObject:self.detailsController];
  8.  
  9. self.photoController = [[PostPhotosViewController alloc] initWithNibName:@"PostPhotosView" bundle:nil];
  10. self.photoController.title = @"Photos";
  11. self.photoController.tabBarItem.image = [UIImage imageNamed:@"photos.png"];
  12. self.photoController.postController = self;
  13.  
  14.  
  15. [array addObject:self.photoController];
  16.  
  17. tabController.viewControllers = array;
  18. self.view = tabController.view;
  19.  
  20. tabController.delegate = nil;
  21. tabController.selectedIndex = 1;
  22. tabController.selectedIndex = 0;
  23. tabController.delegate = self;
  24.  
  25. self.photoController.tabBarItem.badgeValue = @"1";
Add Comment
Please, Sign In to add comment