Ios Utiabar外观不工作
当使用以下代码行选择UITabBarItem时,我正在尝试更改其色调颜色:Ios Utiabar外观不工作,ios,uitabbar,uitabbaritem,Ios,Uitabbar,Uitabbaritem,当使用以下代码行选择UITabBarItem时,我正在尝试更改其色调颜色: [[UITabBar appearance]setTintColor:[UIColor colorWithRed:89 green:216 blue:239 alpha:1]]; 但是,当我选择选项卡栏时,着色颜色变为白色 有人知道为什么吗 谢谢大家! 将selectedImageTintColor属性设置为您的颜色。将selectedImageTintColor属性设置为您的颜色。在uicolor:RGB中,您需要设
[[UITabBar appearance]setTintColor:[UIColor colorWithRed:89 green:216 blue:239 alpha:1]];
但是,当我选择选项卡栏时,着色颜色变为白色
有人知道为什么吗
谢谢大家! 将selectedImageTintColor属性设置为您的颜色。将selectedImageTintColor属性设置为您的颜色。在uicolor:RGB中,您需要设置255的值
[UIColor colorWithRed:89/255.0f green:216/255.0f blue:239/255.0f alpha:1]
在uicolor:RGB中,需要设置255的值
[UIColor colorWithRed:89/255.0f green:216/255.0f blue:239/255.0f alpha:1]
在应用程序代理的didFinishLaunching方法中尝试以下操作:
[[UITabBar appearance] setSelectedImageTintColor:[UIColor colorWithRed:89/255.0f green:216/255.0f blue:239/255.0f alpha:1]];
在iOS 7中使用:
[[UITabBar appearance] setTintColor:[UIColor colorWithRed:89/255.0f green:216/255.0f blue:239/255.0f alpha:1]];
在应用程序代理的didFinishLaunching方法中尝试以下操作:
[[UITabBar appearance] setSelectedImageTintColor:[UIColor colorWithRed:89/255.0f green:216/255.0f blue:239/255.0f alpha:1]];
在iOS 7中使用:
[[UITabBar appearance] setTintColor:[UIColor colorWithRed:89/255.0f green:216/255.0f blue:239/255.0f alpha:1]];
请尝试以下方法:
[[UITabBar appearance] setTintColor:[[UIColor colorWithRed:89/255.0f green:216/255.0f blue:239/255.0f alpha:1]];
[[UITabBar appearance] setBarTintColor:[UIColor yellowColor]];//set rgb value if you want
请尝试以下方法:
[[UITabBar appearance] setTintColor:[[UIColor colorWithRed:89/255.0f green:216/255.0f blue:239/255.0f alpha:1]];
[[UITabBar appearance] setBarTintColor:[UIColor yellowColor]];//set rgb value if you want