关于 xcode:change color tabbar icons iOS 5 | 珊瑚贝

change color tabbar icons iOS 5


我可以使用以下命令重新设置 UITabBar 的样式

1
2
3
[[UITabBar appearance] setSelectionIndicatorImage:
 [UIImage imageNamed:@”tab_select_indicator”]];
[[UITabBar appearance] setSelectedImageTintColor:[UIColor redColor]];

,但是如何在选项卡所选择时设置ImageTintColor。默认颜色为灰色,我想将其更改为蓝色。

谢谢


In AppDlegate.m

1
2
3
4
5
– (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[UITabBar appearance] setSelectedImageTintColor:[UIColor redColor]];
return YES;
}

来自 Apple 文档 UITabBar 类参考:

If you want to also customize the unselected image appearance, you must sent setFinishedSelectedImage:withFinishedUnselectedImage: to individual tab bar items.


来源:https://www.codenong.com/7820388/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_8979.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?