1

I want to create a Tabbar that the number of tab bar items is defined by the user (let say it stores in a variable NumberOfTabBarItem). Is there a way to put tab bar items into some sort of array and display? Thanks!

Brian
  • 235
  • 3
  • 11

1 Answers1

0

From the UITabBar class reference, there's a property...

@property(nonatomic, copy) NSArray *items

that can be accessed with...

- (void)setItems:(NSArray *)items animated:(BOOL)animated

So you can programmatically load up an NSArray with TabBar items and use that method to display it.

Staros
  • 3,232
  • 6
  • 30
  • 41