0
我写这个代码,但警告显示“insertSubview” 可能不会响应变化uitabbar背景颜色
- (void)viewDidLoad {
[super viewDidLoad];
CGRect frame = CGRectMake(0, 0, 480, 49);
UIView *v = [[UIView alloc] initWithFrame:frame];
UIImage *i = [UIImage imageNamed:@"GO-21-TabBarColorx49.png"];
UIColor *c = [[UIColor alloc] initWithPatternImage:i];
v.backgroundColor = c;
[c release];
[[self tabBar] addSubview:v];
[v release];
}
我一直很难定制UITabBars – RSully
这是完美的dublicate问题。这个问题的答案还http://stackoverflow.com/questions/571028/changing-tint-background-color-of-uitabbar –