UITabBar tint in iOS 7

后端 未结 4 2390
春和景丽
春和景丽 2021-02-19 15:31

How can i specify the tint of images when a tab is selected and unselected?

I have tried this but it doesnt work:

[[UITabBar appearance] setTintColor:[UI         


        
4条回答
  •  执念已碎
    2021-02-19 15:40

    Are you using the template-version of your images?

    Instead of setting your images with [UIImage imageNamed: @"MyImage"], set them with [[UIImage imageNamed: @"MyImage"] imageWithRenderingMode: UIImageRenderingModeAlwaysTemplate].

    This setup along with your code should solve this issue.

提交回复
热议问题