From 2e96ba22b7a3f63ed2ad911bc277e60f9aa9c74c Mon Sep 17 00:00:00 2001 From: Anders Tidbeck Date: Tue, 9 Jun 2020 11:40:13 +0200 Subject: [PATCH 1/2] Make Sign in with Apple button white in dark mode --- OAuth/FirebaseOAuthUI/FUIOAuth.m | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/OAuth/FirebaseOAuthUI/FUIOAuth.m b/OAuth/FirebaseOAuthUI/FUIOAuth.m index 955d88613b7..1252f4d3a5f 100644 --- a/OAuth/FirebaseOAuthUI/FUIOAuth.m +++ b/OAuth/FirebaseOAuthUI/FUIOAuth.m @@ -79,6 +79,11 @@ @interface FUIOAuth () Date: Wed, 10 Jun 2020 10:32:43 +0200 Subject: [PATCH 2/2] Used named colors instead of RGBA values --- OAuth/FirebaseOAuthUI/FUIOAuth.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/OAuth/FirebaseOAuthUI/FUIOAuth.m b/OAuth/FirebaseOAuthUI/FUIOAuth.m index 1252f4d3a5f..f7a9dbde924 100644 --- a/OAuth/FirebaseOAuthUI/FUIOAuth.m +++ b/OAuth/FirebaseOAuthUI/FUIOAuth.m @@ -123,7 +123,7 @@ - (instancetype)initWithAuthUI:(FUIAuth *)authUI _signInLabel = buttonLabelText; _shortName = shortName; _buttonBackgroundColor = buttonColor; - _buttonTextColor = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]; + _buttonTextColor = [UIColor whiteColor]; _icon = iconImage; _scopes = scopes; _customParameters = customParameters; @@ -192,13 +192,13 @@ + (FUIOAuth *)yahooAuthProvider { + (FUIOAuth *)appleAuthProvider { UIImage *iconImage = [FUIAuthUtils imageNamed:@"ic_apple" - fromBundleNameOrNil:@"FirebaseOAuthUI"]; - UIColor *buttonColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0]; - UIColor *buttonTextColor = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]; + fromBundleNameOrNil:@"FirebaseOAuthUI"]; + UIColor *buttonColor = [UIColor blackColor]; + UIColor *buttonTextColor = [UIColor whiteColor]; if (UITraitCollection.currentTraitCollection.userInterfaceStyle == UIUserInterfaceStyleLight) { - iconImage = [iconImage imageWithTintColor:[UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0]]; - buttonColor = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]; - buttonTextColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0]; + iconImage = [iconImage imageWithTintColor:[UIColor blackColor]]; + buttonColor = [UIColor whiteColor]; + buttonTextColor = [UIColor blackColor]; } FUIOAuth *provider = [[FUIOAuth alloc] initWithAuthUI:[FUIAuth defaultAuthUI] providerID:@"apple.com"