I have changed the default blue color of some selected text with setTitleTextAttributes. However, the image still becomes blue when selected.

enter image description here

How can I change this behavior?

有帮助吗?

解决方案

I would use UIAppearance.

[[UITabBar appearance] setSelectedImageTintColor:[UIColor redColor]];

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top