Guest User

Untitled

a guest
Aug 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. UITabBar Action in a loop
  2. int i =0;
  3.  
  4. for (NSString *items in array)
  5. {
  6. //Set button style
  7. [barButton setStyle:UIBarButtonItemStyleBordered];
  8.  
  9. //Set the button title
  10. [barButton setTitle:[array objectAtIndex:i]];
  11.  
  12.  
  13. [barButton setAction:@selector(tmp:)];
  14.  
  15. //Add the bar button to the array - later will load the array to the tool bar items list.
  16. [itemsArray insertObject:barButton atIndex:i];
  17.  
  18. i++;
  19.  
  20.  
  21. }
Add Comment
Please, Sign In to add comment