Fix the “navigation titles are black after sharing” issue.

// FREEBIE
pull/1/head
Matthew Chen 9 years ago
parent 4440183414
commit 89de686809

@ -1,3 +1,7 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "UIUtil.h" #import "UIUtil.h"
#define CONTACT_PICTURE_VIEW_BORDER_WIDTH 0.5f #define CONTACT_PICTURE_VIEW_BORDER_WIDTH 0.5f
@ -30,8 +34,9 @@
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault]; [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
[[UINavigationBar appearance] setBarStyle:UIBarStyleDefault]; [[UINavigationBar appearance] setBarStyle:UIBarStyleDefault];
[[UIBarButtonItem appearance] setTintColor:[UIColor blackColor]]; [[UIBarButtonItem appearance] setTintColor:[UIColor blackColor]];
NSDictionary *navbarTitleTextAttributes = @{ NSForegroundColorAttributeName : [UIColor blackColor] }; [[UINavigationBar appearance] setTitleTextAttributes:@{
[[UINavigationBar appearance] setTitleTextAttributes:navbarTitleTextAttributes]; NSForegroundColorAttributeName : [UIColor blackColor],
}];
} }
+ (void)applySignalAppearence + (void)applySignalAppearence
@ -46,14 +51,10 @@
[[UIToolbar appearance] setTintColor:[UIColor ows_materialBlueColor]]; [[UIToolbar appearance] setTintColor:[UIColor ows_materialBlueColor]];
[[UIBarButtonItem appearance] setTintColor:[UIColor whiteColor]]; [[UIBarButtonItem appearance] setTintColor:[UIColor whiteColor]];
NSShadow *shadow = [NSShadow new]; // If we set NSShadowAttributeName, the NSForegroundColorAttributeName value is ignored.
[shadow setShadowColor:[UIColor clearColor]]; [[UINavigationBar appearance] setTitleTextAttributes:@{
NSForegroundColorAttributeName : [UIColor whiteColor],
NSDictionary *navbarTitleTextAttributes = @{ }];
NSForegroundColorAttributeName : [UIColor whiteColor],
NSShadowAttributeName : shadow,
};
[[UINavigationBar appearance] setTitleTextAttributes:navbarTitleTextAttributes];
} }
@end @end

Loading…
Cancel
Save