I recently noticed that the behavior of the property tintColorhas changed significantly in one of the latest iOS 10 updates.
I had code that worked fine earlier and which now doesn't work at all.
In one of my applications, I have a collection UIBarButtonItemthat are added to the toolbarItemsview controller array . They are displayed well.
However, at some point I want to change the hue of some elements in response to a user action. The code is trivial:
flagButton.tintColor = [UIColor redColor];
This code used to work, but now it doesn't work! I checked that there is a link to UIBarButtonItemand that line of code is being executed. However, the color of the hue does not change as it should.
The property description tintColorsays:
To update the subview rendering when this property changes, override the tintColorDidChange () method.
I tried adding a method tintColorDidChange, but it is not being called. My guess at this point is that after the change, tintColormy button does not automatically update.
Has anyone found a way to update it manually? The button is standard UIBarButtonItemwith the image.
Update 1
In fact, I noticed that if I changed tintColorthe toolbar instead of a separate item, the code works. It seems that for some reason, setting the hue color to individual objects no longer works. Does anyone know why this is so?
Update 2
Thanks to the matte prompt, I was able to find the source of the problem. This was caused by the code executed when the application started:
[[UITableViewCell appearance] setTintColor:[ColourTheme sharedTheme].navBackground];
, UIBarButtonItem... , UIAppearance. , , . , , , , , .
, - , , .