Reputation: 2343
Is there way to customize TabBar like this? We use iOS5.
Upvotes: 1
Views: 287
Reputation: 11053
Check here how can i create custom tab bar ...add custom images in tab bar (without xib changes)
Don't forget Tab Bar consists of rectangular tabs - your design does not really follow these rules...
So, I am not sure if this will pass Apple's UI guidelines when submitting to App store
Why not make a NavigationBar that looks like this?
Upvotes: 0
Reputation: 4091
you can get a better idea on the customization using this tutorial
Upvotes: 1
Reputation: 1795
Yes this isn't actually to difficult to do.
1) Subclass UITTabBarController
2) Run a method to hide all UITabBar class elements like below
3) Draw your own elements onto self ([self.view addSubview:CustomButton])
for(UIView *subview in self.view.subviews) {
if([subview isKindOfClass:[UITabBar class]]) {
subview.hidden = YES;
break;
}
}
EDIT
As a further update to explain how your image example is done. You have 4 elements: 1) Background image 2) Left button 3) Middle button 4) Right button
So UIImageView and UIButton with [UIButton buttonWithType:UIButtonTypeCustom] are all you need for this magic to happen.
Upvotes: 2