Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Utiabar外观不工作_Ios_Uitabbar_Uitabbaritem - Fatal编程技术网

Ios Utiabar外观不工作

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中,您需要设

当使用以下代码行选择UITabBarItem时,我正在尝试更改其色调颜色:

[[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