self.tabbar自定义高度白色背景

时间:2012-10-09 08:56:06

标签: iphone objective-c uitabbar

enter image description here

        UIImage *TabBarFooterImage = [UIImage imageNamed:@"b_bar"];
        CGRect viewFrame = self.tabBar.frame;
        viewFrame.origin.y +=4; //the correct position of the tab bar
        viewFrame.size.height = 45; //the correct height
        self.tabBar.frame = viewFrame;
        [self.tabBar setBackgroundImage:TabBarFooterImage];

我已将自定义高度设置为tabbar。 tabbar上有一条白线。我该如何删除它?

1 个答案:

答案 0 :(得分:1)

这会对你有帮助。

imgTab = [[UIImageView alloc]initWithFrame:CGRectMake(0,0,320.0,50)];
imgTab.image=[UIImage imageNamed:@"bottambar.png"];
tabBarController.tabBar.tag=10;
[tabBarController.tabBar addSubview:imgTab];