Reputation: 6386
I have created a iphone app using tab bar application template...
I want to show the tab bar in the top but now it showing in the bottom..
Is there any way to show the tab bar in the top?
Also is there any way to change the icon of it? if so.. how?
Thanks for any help
Upvotes: 0
Views: 150
Reputation: 6448
Tab bar item icons can be set programmatically like this:
UITabBarItem *t = [[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"Title", @"Title - tab bar item") image:[UIImage imageNamed:@"tab_bar_icon.png"] tag:0];
For the position of your tab bar controller, I agree with Dolbz's answer.
Edited: to add a tab bar item to your existing tab bar:
one_Of_My_View_Controller.tabBarItem = t;
[t release];
tabBarController.viewControllers = [NSArray arrayWithObjects:one_Of_My_View_Controller, nil];
[one_Of_My_View_Controller release];
Upvotes: 0
Reputation: 2106
I would advise against doing this as you risk not having your app accepted in the app store.
People expect standard views and controls to look and behave consistently across applications.
Follow the recommended usages for standard user interface elements. In this way, users can depend on their prior experience to help them as they learn to use your application. You also make it easy for your app to look up-to-date and work correctly if iOS changes the look or behavior of these standard views or controls.
From the iOS Human Interface Guidelines
Upvotes: 4