From 89de686809b41e9311bfa91a7e4f1d35ac3b5111 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 24 Apr 2017 11:56:46 -0400 Subject: [PATCH 1/2] =?UTF-8?q?Fix=20the=20=E2=80=9Cnavigation=20titles=20?= =?UTF-8?q?are=20black=20after=20sharing=E2=80=9D=20issue.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit // FREEBIE --- Signal/src/util/UIUtil.m | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Signal/src/util/UIUtil.m b/Signal/src/util/UIUtil.m index dd67e0f77..b90f0b979 100644 --- a/Signal/src/util/UIUtil.m +++ b/Signal/src/util/UIUtil.m @@ -1,3 +1,7 @@ +// +// Copyright (c) 2017 Open Whisper Systems. All rights reserved. +// + #import "UIUtil.h" #define CONTACT_PICTURE_VIEW_BORDER_WIDTH 0.5f @@ -30,8 +34,9 @@ [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault]; [[UINavigationBar appearance] setBarStyle:UIBarStyleDefault]; [[UIBarButtonItem appearance] setTintColor:[UIColor blackColor]]; - NSDictionary *navbarTitleTextAttributes = @{ NSForegroundColorAttributeName : [UIColor blackColor] }; - [[UINavigationBar appearance] setTitleTextAttributes:navbarTitleTextAttributes]; + [[UINavigationBar appearance] setTitleTextAttributes:@{ + NSForegroundColorAttributeName : [UIColor blackColor], + }]; } + (void)applySignalAppearence @@ -46,14 +51,10 @@ [[UIToolbar appearance] setTintColor:[UIColor ows_materialBlueColor]]; [[UIBarButtonItem appearance] setTintColor:[UIColor whiteColor]]; - NSShadow *shadow = [NSShadow new]; - [shadow setShadowColor:[UIColor clearColor]]; - - NSDictionary *navbarTitleTextAttributes = @{ - NSForegroundColorAttributeName : [UIColor whiteColor], - NSShadowAttributeName : shadow, - }; - [[UINavigationBar appearance] setTitleTextAttributes:navbarTitleTextAttributes]; + // If we set NSShadowAttributeName, the NSForegroundColorAttributeName value is ignored. + [[UINavigationBar appearance] setTitleTextAttributes:@{ + NSForegroundColorAttributeName : [UIColor whiteColor], + }]; } @end From b99984f9d36ad956fc5e75333219eb8825775cd3 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 24 Apr 2017 11:58:07 -0400 Subject: [PATCH 2/2] =?UTF-8?q?Fix=20the=20=E2=80=9Cmessage=20view=20subti?= =?UTF-8?q?tle=20mis-sized=20after=20muting=E2=80=9D=20issue.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit // FREEBIE --- Signal/src/ViewControllers/MessagesViewController.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Signal/src/ViewControllers/MessagesViewController.m b/Signal/src/ViewControllers/MessagesViewController.m index a0ffae2b1..9db3bdadc 100644 --- a/Signal/src/ViewControllers/MessagesViewController.m +++ b/Signal/src/ViewControllers/MessagesViewController.m @@ -1013,6 +1013,7 @@ typedef enum : NSUInteger { NSForegroundColorAttributeName : [UIColor colorWithWhite:0.9f alpha:1.f], }]]; self.navigationBarSubtitleLabel.attributedText = subtitleText; + [self.navigationBarSubtitleLabel sizeToFit]; } - (void)initializeToolbars