时尚的Tabbar在iPhone

时间:2011-11-01 08:06:26

标签: iphone objective-c ios4

如何在Iphone Tabbar上设置不同的样式。想要更改我的应用程序标签栏外观。

帮我编写带有详细信息的简单代码

1 个答案:

答案 0 :(得分:0)

CGRect frame = CGRectMake(0.0, 0.0, self.view.bounds.size.width, 46);
UIView *myTabView = [[UIView alloc] initWithFrame:frame];
[myTabView  setBackgroundColor:[UIColor colorWithRed:0.2 green:0.4 blue:0.6 alpha:0.65]];
[myTabView  setAlpha:0.5];
[[self.tabBarController tabBar] insertSubview:myTabView  atIndex:0];
[myTabView  release];

// Above code is used to change Tabbarcolor