【发布时间】:2014-09-25 16:57:59
【问题描述】:
我通过创建背景图像创建了一个自定义标签栏,然后在我的 appDelegate 中使用了此代码
UITabBar *tabBar = [UITabBar appearance];
tabBar.backgroundImage = [UIImage imageNamed:@"tabbar"];
图片
圆顶周围的颜色都是透明的,但是在应用程序中它会自动将其变为白色,因此在滚动时它在 tableview 中看起来不太好。我可以在 ios 中保持透明吗?
我旁边唯一的标签栏代码如下
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil]
setTitleTextAttributes:
@{NSForegroundColorAttributeName:[UIColor whiteColor],
NSFontAttributeName:[UIFont fontWithName:@"Lato-Regular" size:18]
}
forState:UIControlStateNormal];
【问题讨论】:
标签: ios objective-c uitabbar