I have a UIBarButtonItem in a UINavigationBar that has some custom appearance attributes (custom font, color). It appears normally most places throughout the app.
However, when a UIAlertController with the ActionSheet style is presented over the view controller with this button, the BarButton loses its custom font appearance, leading to a strange looking "jump" on the button and an incorrect font being displayed, as can be seen here: http://giphy.com/gifs/puopiq9mPyI2Q/html5 .
I assume this is likely related to how we are setting the BarButton appearance, with the following code in AppDelegate:
NSDictionary *btnAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor],NSForegroundColorAttributeName,
[AppearanceConstants mediumFontSize20], NSFontAttributeName,nil];
[[UIBarButtonItem appearance] setTitleTextAttributes:btnAttributes forState:UIControlStateNormal];
My guess would be that the bar button is not in UIControlStateNormal, however it doesn't seem like theres anyway for me to tell what state the BarButton is in when the AlertController is presented, and just trying to set the title text attributes to the appropriate values for every control state didn't work either.
When I navigate to other view controllers with BarButtonItems in their NavigationBars after doing this, they still have the correct appearance and if I go back to the problematic screen afterward it will have the correct appearance, until the AlertController is presented again.
self.view.tintAdjustmentMode = UIViewTintAdjustmentModeNormal
in your view controller orself.window.tintAdjustmentMode = UIViewTintAdjustmentModeNormal
in your app delegate. Some other posts suggested this as a solution. – Dennis W.