0

使用iOS 6,我可以UITabBar使用以下代码进行自定义:

[[UITabBar appearance] setSelectedImageTintColor:[UIColor colorWithRed:(39/255.0) green:(205/255.0) blue:(222/255.0) alpha:1]];

但我不能使用iOS 7。我被迫使用两种类型的图片来做到这一点。

4

1 回答 1

4

试试这个:

UIImage *tabBarBackground = [UIImage imageNamed:@"CustomUITabbar.png"];
[[UITabBar appearance] setBackgroundImage:tabBarBackground];
[[UITabBar appearance] setTintColor:[UIColor whiteColor]];

取自:http: //ios-blog.co.uk/tutorials/ios-custom-ui-series-tabbar-navbar/作者:https ://twitter.com/robwhitlow3

于 2013-09-23T10:32:13.983 回答