From 1950bc5be2b4252bc09f554f34665c036c1e2b0a Mon Sep 17 00:00:00 2001 From: Varun Santhanam Date: Tue, 10 Apr 2018 09:12:30 -0700 Subject: [PATCH] Revert "change the background color of alerts" --- VSAlert/VSAlertController.h | 5 ----- VSAlert/VSAlertController.m | 21 ++------------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/VSAlert/VSAlertController.h b/VSAlert/VSAlertController.h index 4090eca..0661205 100644 --- a/VSAlert/VSAlertController.h +++ b/VSAlert/VSAlertController.h @@ -192,11 +192,6 @@ typedef NS_ENUM(NSInteger, VSAlertControllerAnimationStyle) { @name Configuring Alert Appearance */ -/** - The background color of the alert. - */ -@property (NS_NONATOMIC_IOSONLY, strong, nonnull) UIColor *alertBackgroundColor UI_APPEARANCE_SELECTOR; - /** The color of the alert title. The default value is black. */ diff --git a/VSAlert/VSAlertController.m b/VSAlert/VSAlertController.m index c140dbd..3450213 100644 --- a/VSAlert/VSAlertController.m +++ b/VSAlert/VSAlertController.m @@ -20,7 +20,6 @@ @interface VSAlertControllerAppearanceProxy : UIView -@property (NS_NONATOMIC_IOSONLY, strong, nonnull) UIColor *alertBackgroundColor UI_APPEARANCE_SELECTOR; @property (NS_NONATOMIC_IOSONLY, strong, nonnull) UIColor *alertTitleTextColor UI_APPEARANCE_SELECTOR; @property (NS_NONATOMIC_IOSONLY, strong, nonnull) UIColor *alertMessageTextColor UI_APPEARANCE_SELECTOR; @property (NS_NONATOMIC_IOSONLY, strong, nonnull) UIFont *alertTitleTextFont UI_APPEARANCE_SELECTOR; @@ -30,7 +29,6 @@ @interface VSAlertControllerAppearanceProxy : UIView @implementation VSAlertControllerAppearanceProxy -@synthesize alertBackgroundColor = _alertBackgroundColor; @synthesize alertTitleTextColor = _alertTitleTextColor; @synthesize alertTitleTextFont = _alertTitleTextFont; @synthesize alertMessageTextColor = _alertMessageTextColor; @@ -553,7 +551,6 @@ @implementation VSAlertController { static os_log_t alert_log; // Explicitly synthesize Ivars from header -@synthesize alertBackgroundColor = _alertBackgroundColor; @synthesize alertTitleTextColor = _alertTitleTextColor; @synthesize alertMessageTextColor = _alertMessageTextColor; @synthesize alertTitleTextFont = _alertTitleTextFont; @@ -781,19 +778,6 @@ - (void)viewDidDisappear:(BOOL)animated { #pragma mark - Property Access Methods -- (UIColor *)alertBackgroundColor { - - return _alertBackgroundColor; - -} - -- (void)setAlertBackgroundColor:(UIColor *)alertBackgroundColor { - - _alertBackgroundColor = alertBackgroundColor; - self.alertView.backgroundColor = self.alertBackgroundColor; - -} - - (UIColor *)alertTitleTextColor { return _alertTitleTextColor; @@ -1021,8 +1005,7 @@ - (void)_setUpAlertController { _presentAnimator = [[VSAlertControllerTransitionAnimator alloc] init]; _dismissAnimator = [[VSAlertControllerTransitionAnimator alloc] init]; - // Set up propertie without accessors for use with UIAppearance - _alertBackgroundColor = [VSAlertController appearance].alertBackgroundColor ? [VSAlertController appearance].alertBackgroundColor : [UIColor whiteColor]; + // Set up propertie without accessors for use with UIAppearance _alertTitleTextColor = [VSAlertController appearance].alertTitleTextColor ? [VSAlertController appearance].alertTitleTextColor : [UIColor blackColor]; _alertTitleTextFont = [VSAlertController appearance].alertTitleTextFont ? [VSAlertController appearance].alertTitleTextFont : [UIFont systemFontOfSize:17.0f weight:UIFontWeightSemibold]; _alertMessageTextColor = [VSAlertController appearance].alertMessageTextColor ? [VSAlertController appearance].alertMessageTextColor : [UIColor blackColor]; @@ -1097,7 +1080,7 @@ - (void)_setUpAlertMaskBackground { - (void)_setUpAlertView { self.alertView = [[UIView alloc] initWithFrame:CGRectZero]; - self.alertView.backgroundColor = self.alertBackgroundColor; + self.alertView.backgroundColor = [UIColor whiteColor]; self.alertView.translatesAutoresizingMaskIntoConstraints = NO; [self.alertMaskBackground addSubview:self.alertView];