Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Set up the toolbar
  2.     [self.navigationController setToolbarHidden:NO];
  3.     UIBarButtonItem *bestButton = [[UIBarButtonItem alloc] initWithTitle:@"Best" style:UIBarButtonItemStylePlain target:self action:nil]; //replace action later
  4.     UIBarButtonItem *favoritesButton = [[UIBarButtonItem alloc] initWithTitle:@"Favorites" style:UIBarButtonItemStylePlain target:self action:nil];
  5.     UIBarButtonItem *allButton = [[UIBarButtonItem alloc] initWithTitle:@"All" style:UIBarButtonItemStylePlain target:self action:nil];
  6.     NSArray *array = [[NSArray alloc]initWithObjects:bestButton,favoritesButton,allButton,nil];
  7.     [allButton release];
  8.     [favoritesButton release];
  9.     [bestButton release];
  10.     [self.navigationController setToolbarItems:array];
  11.     [array release];
  12.    
  13.     [self.window makeKeyAndVisible];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement