iOS 6では、次のコードでカスタマイズできUITabBar
ます。
[[UITabBar appearance] setSelectedImageTintColor:[UIColor colorWithRed:(39/255.0) green:(205/255.0) blue:(222/255.0) alpha:1]];
しかし、iOS 7ではできません。これを行うには、2 種類の画像を使用する必要があります。
iOS 6では、次のコードでカスタマイズできUITabBar
ます。
[[UITabBar appearance] setSelectedImageTintColor:[UIColor colorWithRed:(39/255.0) green:(205/255.0) blue:(222/255.0) alpha:1]];
しかし、iOS 7ではできません。これを行うには、2 種類の画像を使用する必要があります。
これを試して:
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/ by: https://twitter.com/robwhitlow3