This is dirty - but works and got approved:
- resizes tabbar
- use your own images in own size
in the tab controller setup
tabController = [[UITabBarController alloc] init];
tabController.view.frame = CGRectMake(0, 72, 320, 480 - (82));
tabController.delegate = self;
UIImageView *bgImageView;
bgImageView = [ [ UIImageView alloc ] initWithImage: [UIImage imageNamed:TABBAR_BACKGROUND]];
bgImageView.frame = CGRectMake(0, -11, 320, 60);
[[tabController tabBar] addSubview:bgImageView];
[[tabController tabBar] sendSubviewToBack:bgImageView];
tabController.tabBar.frame = CGRectMake(0, 460 - (59 + 52 - 11), 320, 49);
[bgImageView release];
[window addSubview:tabController.view];
in the tabviewcontroller1 init method
- (id) init
{
if(self = [super init])
{
CustomTabBarItem *tabItem = [[CustomTabBarItem alloc]
initWithTitle:@"" image:nil tag:0];
tabItem.customHighlightedImage=[UIImage imageNamed:TABBAR_TAB_1_ACTIVE];
tabItem.customStdImage=[UIImage imageNamed:TABBAR_TAB_1_DEFAULT];
self.tabBarItem=tabItem;
[tabItem release];
tabItem=nil;
}
return self;
}
and the custom tab bar it looks like
@interface CustomTabBarItem : UITabBarItem
{
UIImage *customHighlightedImage;
UIImage *customStdImage;
}
@property (nonatomic, retain) UIImage *customHighlightedImage;
@property (nonatomic, retain) UIImage *customStdImage;
@end
#import "CustomTabBarItem.h"
@implementation CustomTabBarItem
@synthesize customHighlightedImage;
@synthesize customStdImage;
- (void) dealloc
{
[customHighlightedImage release]; customHighlightedImage=nil;
[customStdImage release]; customStdImage=nil;
[super dealloc];
}
-(UIImage *) selectedImage
{
return self.customHighlightedImage;
}
-(UIImage *) unselectedImage
{
return self.customStdImage;
}
@end
IMPORTANT:
i'm pretty new to iphone development and pretty pretty shure you can do this way less hacky. furthermore i got approved with this which does NOT mean you autmoatically will, too.