I had the following code in place which was putting a nice image in the background of my tabbar, but its stopped working. Has anyone got any other suggestions as to what I can do. I've tried a few other options as seen here: Setting a background image for a tabbar
-(void)viewDidLoad
{
CGRect frame = CGRectMake(0, 0, 480, 49);
UIView *v = [[UIView alloc] initWithFrame:frame];
UIImage *i = [UIImage imageNamed:@"smallMenuBackground.png"];
UIColor *c = [[UIColor alloc] initWithPatternImage:i];
v.backgroundColor = c;
[c release];
[mainTabBar insertSubview:v atIndex:0];
[v release];
[super viewDidLoad];
}
Any help appreciated.
UPDATE 23rd January 2012
Ok, I've made a bit of progress. This only stopped working since I upgraded to Xcode 4.2 and IOS5. I managed to get it back using the options in Interface Builder, but now it only works for IOS5. Ideally I would have liked to get working programatically but I'll settle for the IB solution for now.
I just can't seem to get it working for any previous releases.
NOTE: my TabBar is only on my rootviewcontroller and no other screens.
Regards, Stephen