【发布时间】:2012-06-24 10:19:44
【问题描述】:
我正在尝试在我的应用程序中使用透明标签栏,以便用户可以看到标签栏后面的uitableview。
这里的题目我都看过了,还没有成功。
我的 AppDelegate 中有以下代码:
UITabBar *tabBar = [self.tabBarController tabBar];
if ([tabBar respondsToSelector:@selector(setBackgroundImage:)])
{
tabBar.opaque = NO;
tabBar.alpha = 0.8;
[[UITabBar appearance] setTintColor:[[UIColor alloc] initWithRed:0.0 green:0 blue:0 alpha:0.9]];
[tabBar setBackgroundImage:[UIImage imageNamed:@"transparent-tabbar.png"]];
}
我只是没有成功禁用标签栏的默认黑色背景。
我错过了什么?
顺便说一下,文件 transparent-tabbar.png 是: http://www.fastup.co.il/images/49382332.png
谢谢。
【问题讨论】:
-
请看这两个链接,希望对您有所帮助。 stackoverflow.com/questions/3735076/…> stackoverflow.com/questions/7800474/…>