Я хочу изменить цвет неактивных значков на панели вкладок в ios7.Как изменить цвет неактивных значков вкладки в ios7?
Я знаю, как установить цвет для выбранного элемента TabBar, но я не знаю, как установить цвет в неактивные элементы TabBar.
Кто-нибудь знает, как это сделать? Спасибо заранее!
Это мой код в appDelegate.m
//tint color for tabbar
[UITabBar appearance].barTintColor = [UIColor colorWithRed:0.077 green:0.411 blue:0.672 alpha:1.000];
//tint color for the text of inactive tabbar item.
[[UITabBarItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]} forState:UIControlStateNormal];
//tint color for the text of selected tabbar item.
[[UITabBarItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor orangeColor]} forState:UIControlStateSelected];
//tint color for the selected tabbar item.
[[UITabBar appearance] setTintColor:[UIColor whiteColor]];
//tint color for the inactive tabbar items.
//Question:how can I set tint color for the inactive tabbar items???
Я считаю, что оттенок цветом на панели вкладок является цветом неактивных вкладок, потому что существует также 'selectedImageTintColor'. Я не уверен на 100% об этом, но без фактического тестирования. – erdekhayser
@foriinrangeawesome Вы неверны. Apple действительно испортила это. «SelectedImageTintColor» игнорируется, а неактивные вкладки всегда серые, без API для его изменения. – rmaddy
Apple должна действительно пересмотреть свою документацию – erdekhayser