I set up UIBarButtonItem
title font through appearance
proxy in AppDelegate:
[[UIBarButtonItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIFont fontWithName:@"Segoe Print" size: 14.0], UITextAttributeFont,
DEF_TITLE_COLOR,UITextAttributeTextColor,
[UIColor colorWithRed:100/255 green:128/255 blue:43/255 alpha:0.4], UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset, nil]
forState:UIControlStateNormal&UIControlStateHighlighted&UIControlStateDisabled];
And after that I am calling presentViewController::
in some place of my app. Bar button is shown with proper font and background image, which I set up in this ViewController (not through appearance):
But when I press "Join" button, standard non-customized UIAlertView is shown, and right after it appears on the screen my barButton font changes to ... standard? And color also looks like tint color. I have no Idea what I am doing wrong, tried loads of things to figure it out:
This bug appears only on iOS7.
Well, I've figured that apperance proxy doesn't work as I expected. I copy-pasted customization method right before a place where UIBarButtonItem
is initialized, and it worked as charm.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With