Since updating to iOS 7.1, my tab bar images initialize as if they were all active, they are all highlighted on launch. Once I visit each tab, that tab image resets and displays correctly. Has anyone else seen this behavior? Suggestions for work around?

有帮助吗?

解决方案 2

In my case, as I finally figured out, this issue was caused by setup of appearance protocol on UIView in my style controller which is called at startup.

I had been setting an overall tint color for UIView. It did not apply to the icons in iOS7.0 but that must have changed in 7.1.

My style code:

  // Color for buttons and enabled controls
  UIView *viewAppearance = [UIView appearance];
  [viewAppearance setTintColor:overallTintColor];

I added this to fix:

  [[UIView appearanceWhenContainedIn:[UITabBar class], nil] setTintColor:[UIColor darkGrayColor]];

darkGrayColor is not ideal, I just threw it in there for testing. I tried using nil, as I would like it to just go back to the default as it used to. Giving nil as a color did not have any effect. I suppose I will play with some color values until I get a close match.

其他提示

I rolled back my xcode to version 5.0, which the only old version i have and build the app using it. It works perfectly on iOS7.1 device now.

If you have the xcode version 5.0.2 that would be great also.

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