添加图片到UITabBarController中

我要在UITabBarController中添加一个图片,是整张图片添加到标签栏 tab bar,不是添加到哪个标签项tab item中,不知道能不能实现?有高人帮忙指点一下,多谢。

如果用iOS 5+版本,可以用setBackgroundImage:

UITabBar *yourtabBar = [yourtabController tabBar];

[yourtabBar setBackgroundImage:[UIImage imageNamed:@"tabbar.jpg"]];

解决方法如下:

 UIImage *tabBackground = [[UIImage imageNamed:@"Your Image"] 
                          resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
// Set background for all UITabBars

[[UITabBar appearance] setBackgroundImage:tabBackground];

// Set background for only this UITabBar

[[tabBarController tabBar] setBackgroundImage:tabBackground];

不用谢嘻嘻