This crashes the app:
[[UINavigationBar appearance] setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
Is there a way to do this using appearance?
A user changes the navigation bar's style, or UIBarStyle , by tapping the “Style” button to the left of the main page. This button opens an action sheet where users can change the background's appearance to default, black-opaque, or black- translucent.
This worked:
NSDictionary *textTitleOptions = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor darkGrayColor], UITextAttributeTextColor, [UIColor whiteColor], UITextAttributeTextShadowColor, nil]; [[UINavigationBar appearance] setTitleTextAttributes:textTitleOptions];
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