从导航/标签栏中删除光泽度/渐变效果

Fed*_*rer 1 uinavigationbar uicolor ios

我想删除发生在渐变效果UINavigationBarUITabBar.下图显示了使用88年7月29日自定义的UIColor(RGB),设置使用的例子标签栏setTintColor:color,正如你所看到的,标签栏在栏的上半光泽.

在此输入图像描述

我该如何删除?

XJo*_*nes 6

取决于您对"删除"的定义.在iOS 6.x(没有测试iOS 4/5)下面的工作.

// this will show a tab bar with a solid background color
tabBar.backgroundImage = [UIImage new];
tabBar.backroundColor = [UIColor blueColor];

// this will show a navigation bar with a solid background color
[navBar setBakgroundImage:[UIImage new]
            forBarMetrics:UIBarMetricsDefault]];
navBar.shadowImage = [UIImage new];
navBar.backgroundColor = [UIColor blueColor];
navBar.tintColor = [UIColor blueColor];
Run Code Online (Sandbox Code Playgroud)