关于标签栏

时间:2011-05-05 08:19:32

标签: iphone ios4 uitabbar

如何让UITabBar变得透明。可能吗? 如果是,请帮助。 Thanx为您的合作。

1 个答案:

答案 0 :(得分:-3)

这是答案......

@interface UITabBarController (private)
- (UITabBar *)tabBar;
@end

@implementation CustomUITabBarController


- (void)viewDidLoad {
    [super viewDidLoad];

    CGRect frame = CGRectMake(0.0, 0.0, self.view.bounds.size.width, 48);
    UIView *v = [[UIView alloc] initWithFrame:frame];
    [v setBackgroundColor:kMainColor];
    [v setAlpha:0.5];
    [[self tabBar] addSubview:v];
    [v release];

}
@end

是的,这是可能的!

相关问题