Reputation: 3
I try to distribute Tab Bar buttons across the bottom of the iPad screen.
Apple :
For the iPad user interface item, tab bar items are positioned closely adjacent to each other with a default width and inter-item spacing.
@property(nonatomic) UITabBarItemPositioning itemPositioning;
To force tab bar items to fill all space horizontally, specify the UITabBarItemPositioningFill constant for this property;
in .h
@property(nonatomic) UITabBarItemPositioning itemPositioning;
in .m
@synthesize itemPositioning=UITabBarItemPositioningFill;
But it's not working. What am I doing wrong?
Upvotes: 0
Views: 501
Reputation: 104082
You need to set the value of the itemPositioning property to UITabBarItemPositioningFill. You don't do that in an @synthesize statement (so delete that line). You need something like this in viewDidLoad of the controller in the first tab,
self.tabBarController.tabBar.itemPositioning = UITabBarItemPositioningFill;
Upvotes: 2