diff --git a/QMUIKit/UIComponents/QMUIDialogViewController.h b/QMUIKit/UIComponents/QMUIDialogViewController.h index 0f54adf9..0f30ad96 100644 --- a/QMUIKit/UIComponents/QMUIDialogViewController.h +++ b/QMUIKit/UIComponents/QMUIDialogViewController.h @@ -38,7 +38,7 @@ @property(nonatomic, strong) UIColor *headerViewBackgroundColor UI_APPEARANCE_SELECTOR; @property(nonatomic, assign) CGFloat footerViewHeight UI_APPEARANCE_SELECTOR; @property(nonatomic, strong) UIColor *footerViewBackgroundColor UI_APPEARANCE_SELECTOR; -@property(nonatomic, strong) NSDictionary *buttonTitleAttributeds UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) NSDictionary *buttonTitleAttributes UI_APPEARANCE_SELECTOR; @property(nonatomic, strong) UIColor *buttonHighlightedBackgroundColor UI_APPEARANCE_SELECTOR; @property(nonatomic, strong, readonly) UIView *headerView; diff --git a/QMUIKit/UIComponents/QMUIDialogViewController.m b/QMUIKit/UIComponents/QMUIDialogViewController.m index ffe6e465..3cba855b 100644 --- a/QMUIKit/UIComponents/QMUIDialogViewController.m +++ b/QMUIKit/UIComponents/QMUIDialogViewController.m @@ -48,7 +48,7 @@ + (instancetype)appearance { dialogViewControllerAppearance.footerViewHeight = 48; dialogViewControllerAppearance.footerViewBackgroundColor = UIColorWhite; - dialogViewControllerAppearance.buttonTitleAttributeds = @{NSForegroundColorAttributeName: UIColorBlue, NSKernAttributeName: @2}; + dialogViewControllerAppearance.buttonTitleAttributes = @{NSForegroundColorAttributeName: UIColorBlue, NSKernAttributeName: @2}; dialogViewControllerAppearance.buttonHighlightedBackgroundColor = [UIColorBlue colorWithAlphaComponent:.25]; } }); @@ -81,7 +81,7 @@ - (void)didInitialized { self.headerViewBackgroundColor = [QMUIDialogViewController appearance].headerViewBackgroundColor; self.footerViewHeight = [QMUIDialogViewController appearance].footerViewHeight; self.footerViewBackgroundColor = [QMUIDialogViewController appearance].footerViewBackgroundColor; - self.buttonTitleAttributeds = [QMUIDialogViewController appearance].buttonTitleAttributeds; + self.buttonTitleAttributes = [QMUIDialogViewController appearance].buttonTitleAttributes; self.buttonHighlightedBackgroundColor = [QMUIDialogViewController appearance].buttonHighlightedBackgroundColor; } } @@ -151,13 +151,13 @@ - (void)setFooterViewBackgroundColor:(UIColor *)footerViewBackgroundColor { self.footerView.backgroundColor = footerViewBackgroundColor; } -- (void)setButtonTitleAttributeds:(NSDictionary *)buttonTitleAttributeds { - _buttonTitleAttributeds = buttonTitleAttributeds; +- (void)setButtonTitleAttributes:(NSDictionary *)buttonTitleAttributes { + _buttonTitleAttributes = buttonTitleAttributes; if (self.cancelButton) { - [self.cancelButton setAttributedTitle:[[NSAttributedString alloc] initWithString:[self.cancelButton attributedTitleForState:UIControlStateNormal].string attributes:buttonTitleAttributeds] forState:UIControlStateNormal]; + [self.cancelButton setAttributedTitle:[[NSAttributedString alloc] initWithString:[self.cancelButton attributedTitleForState:UIControlStateNormal].string attributes:buttonTitleAttributes] forState:UIControlStateNormal]; } if (self.submitButton) { - [self.submitButton setAttributedTitle:[[NSAttributedString alloc] initWithString:[self.submitButton attributedTitleForState:UIControlStateNormal].string attributes:buttonTitleAttributeds] forState:UIControlStateNormal]; + [self.submitButton setAttributedTitle:[[NSAttributedString alloc] initWithString:[self.submitButton attributedTitleForState:UIControlStateNormal].string attributes:buttonTitleAttributes] forState:UIControlStateNormal]; } } @@ -316,7 +316,7 @@ - (QMUIButton *)generateButtonWithText:(NSString *)buttonText { button.titleLabel.font = UIFontBoldMake(15); button.adjustsTitleTintColorAutomatically = YES; button.highlightedBackgroundColor = self.buttonHighlightedBackgroundColor; - [button setAttributedTitle:[[NSAttributedString alloc] initWithString:buttonText attributes:self.buttonTitleAttributeds] forState:UIControlStateNormal]; + [button setAttributedTitle:[[NSAttributedString alloc] initWithString:buttonText attributes:self.buttonTitleAttributes] forState:UIControlStateNormal]; return button; } diff --git a/QMUIKit/UIKitExtensions/QMUIAlertController.h b/QMUIKit/UIKitExtensions/QMUIAlertController.h index dbdcb299..487b0e37 100644 --- a/QMUIKit/UIKitExtensions/QMUIAlertController.h +++ b/QMUIKit/UIKitExtensions/QMUIAlertController.h @@ -66,12 +66,12 @@ typedef NS_ENUM(NSInteger, QMUIAlertControllerStyle) { @property(nonatomic, assign) UIEdgeInsets alertContentMargin UI_APPEARANCE_SELECTOR; @property(nonatomic, assign) CGFloat alertContentMaximumWidth UI_APPEARANCE_SELECTOR; @property(nonatomic, strong) UIColor *alertSeperatorColor UI_APPEARANCE_SELECTOR; -@property(nonatomic, strong) NSDictionary *alertTitleAttributeds UI_APPEARANCE_SELECTOR; -@property(nonatomic, strong) NSDictionary *alertMessageAttributeds UI_APPEARANCE_SELECTOR; -@property(nonatomic, strong) NSDictionary *alertButtonAttributeds UI_APPEARANCE_SELECTOR; -@property(nonatomic, strong) NSDictionary *alertButtonDisabledAttributeds UI_APPEARANCE_SELECTOR; -@property(nonatomic, strong) NSDictionary *alertCancelButtonAttributeds UI_APPEARANCE_SELECTOR; -@property(nonatomic, strong) NSDictionary *alertDestructiveButtonAttributeds UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) NSDictionary *alertTitleAttributes UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) NSDictionary *alertMessageAttributes UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) NSDictionary *alertButtonAttributes UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) NSDictionary *alertButtonDisabledAttributes UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) NSDictionary *alertCancelButtonAttributes UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) NSDictionary *alertDestructiveButtonAttributes UI_APPEARANCE_SELECTOR; @property(nonatomic, assign) CGFloat alertContentCornerRadius UI_APPEARANCE_SELECTOR; @property(nonatomic, assign) CGFloat alertButtonHeight UI_APPEARANCE_SELECTOR; @property(nonatomic, strong) UIColor *alertHeaderBackgroundColor UI_APPEARANCE_SELECTOR; @@ -83,12 +83,12 @@ typedef NS_ENUM(NSInteger, QMUIAlertControllerStyle) { @property(nonatomic, assign) UIEdgeInsets sheetContentMargin UI_APPEARANCE_SELECTOR; @property(nonatomic, assign) CGFloat sheetContentMaximumWidth UI_APPEARANCE_SELECTOR; @property(nonatomic, strong) UIColor *sheetSeperatorColor UI_APPEARANCE_SELECTOR; -@property(nonatomic, strong) NSDictionary *sheetTitleAttributeds UI_APPEARANCE_SELECTOR; -@property(nonatomic, strong) NSDictionary *sheetMessageAttributeds UI_APPEARANCE_SELECTOR; -@property(nonatomic, strong) NSDictionary *sheetButtonAttributeds UI_APPEARANCE_SELECTOR; -@property(nonatomic, strong) NSDictionary *sheetButtonDisabledAttributeds UI_APPEARANCE_SELECTOR; -@property(nonatomic, strong) NSDictionary *sheetCancelButtonAttributeds UI_APPEARANCE_SELECTOR; -@property(nonatomic, strong) NSDictionary *sheetDestructiveButtonAttributeds UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) NSDictionary *sheetTitleAttributes UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) NSDictionary *sheetMessageAttributes UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) NSDictionary *sheetButtonAttributes UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) NSDictionary *sheetButtonDisabledAttributes UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) NSDictionary *sheetCancelButtonAttributes UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) NSDictionary *sheetDestructiveButtonAttributes UI_APPEARANCE_SELECTOR; @property(nonatomic, assign) CGFloat sheetCancelButtonMarginTop UI_APPEARANCE_SELECTOR; @property(nonatomic, assign) CGFloat sheetContentCornerRadius UI_APPEARANCE_SELECTOR; @property(nonatomic, assign) CGFloat sheetButtonHeight UI_APPEARANCE_SELECTOR; diff --git a/QMUIKit/UIKitExtensions/QMUIAlertController.m b/QMUIKit/UIKitExtensions/QMUIAlertController.m index b8bf72d0..fb039fb1 100644 --- a/QMUIKit/UIKitExtensions/QMUIAlertController.m +++ b/QMUIKit/UIKitExtensions/QMUIAlertController.m @@ -136,13 +136,13 @@ + (void)resetAppearance { alertControllerAppearance.alertContentMargin = UIEdgeInsetsMake(0, 0, 0, 0); alertControllerAppearance.alertContentMaximumWidth = 270; alertControllerAppearance.alertSeperatorColor = UIColorMake(211, 211, 219); - alertControllerAppearance.alertTitleAttributeds = @{NSForegroundColorAttributeName:UIColorBlack,NSFontAttributeName:UIFontBoldMake(17),NSParagraphStyleAttributeName:[NSMutableParagraphStyle qmui_paragraphStyleWithLineHeight:0 lineBreakMode:NSLineBreakByTruncatingTail]}; - alertControllerAppearance.alertMessageAttributeds = @{NSForegroundColorAttributeName:UIColorBlack,NSFontAttributeName:UIFontMake(13),NSParagraphStyleAttributeName:[NSMutableParagraphStyle qmui_paragraphStyleWithLineHeight:0 lineBreakMode:NSLineBreakByTruncatingTail]}; + alertControllerAppearance.alertTitleAttributes = @{NSForegroundColorAttributeName:UIColorBlack,NSFontAttributeName:UIFontBoldMake(17),NSParagraphStyleAttributeName:[NSMutableParagraphStyle qmui_paragraphStyleWithLineHeight:0 lineBreakMode:NSLineBreakByTruncatingTail]}; + alertControllerAppearance.alertMessageAttributes = @{NSForegroundColorAttributeName:UIColorBlack,NSFontAttributeName:UIFontMake(13),NSParagraphStyleAttributeName:[NSMutableParagraphStyle qmui_paragraphStyleWithLineHeight:0 lineBreakMode:NSLineBreakByTruncatingTail]}; alertControllerAppearance.alertContentCornerRadius = (IOS_VERSION >= 9.0 ? 13 : 6); - alertControllerAppearance.alertButtonAttributeds = @{NSForegroundColorAttributeName:UIColorBlue,NSFontAttributeName:UIFontMake(17),NSKernAttributeName:@(0)}; - alertControllerAppearance.alertButtonDisabledAttributeds = @{NSForegroundColorAttributeName:UIColorMake(129, 129, 129),NSFontAttributeName:UIFontMake(17),NSKernAttributeName:@(0)}; - alertControllerAppearance.alertCancelButtonAttributeds = @{NSForegroundColorAttributeName:UIColorBlue,NSFontAttributeName:UIFontBoldMake(17),NSKernAttributeName:@(0)}; - alertControllerAppearance.alertDestructiveButtonAttributeds = @{NSForegroundColorAttributeName:UIColorRed,NSFontAttributeName:UIFontMake(17),NSKernAttributeName:@(0)}; + alertControllerAppearance.alertButtonAttributes = @{NSForegroundColorAttributeName:UIColorBlue,NSFontAttributeName:UIFontMake(17),NSKernAttributeName:@(0)}; + alertControllerAppearance.alertButtonDisabledAttributes = @{NSForegroundColorAttributeName:UIColorMake(129, 129, 129),NSFontAttributeName:UIFontMake(17),NSKernAttributeName:@(0)}; + alertControllerAppearance.alertCancelButtonAttributes = @{NSForegroundColorAttributeName:UIColorBlue,NSFontAttributeName:UIFontBoldMake(17),NSKernAttributeName:@(0)}; + alertControllerAppearance.alertDestructiveButtonAttributes = @{NSForegroundColorAttributeName:UIColorRed,NSFontAttributeName:UIFontMake(17),NSKernAttributeName:@(0)}; alertControllerAppearance.alertContentCornerRadius = (IOS_VERSION >= 9.0 ? 13 : 6); alertControllerAppearance.alertButtonHeight = 44; alertControllerAppearance.alertHeaderBackgroundColor = (IOS_VERSION < 8.0) ? UIColorWhite : UIColorMakeWithRGBA(247, 247, 247, 1); @@ -154,12 +154,12 @@ + (void)resetAppearance { alertControllerAppearance.sheetContentMargin = UIEdgeInsetsMake(10, 10, 10, 10); alertControllerAppearance.sheetContentMaximumWidth = [QMUIHelper screenSizeFor55Inch].width - UIEdgeInsetsGetHorizontalValue(alertControllerAppearance.sheetContentMargin); alertControllerAppearance.sheetSeperatorColor = UIColorMake(211, 211, 219); - alertControllerAppearance.sheetTitleAttributeds = @{NSForegroundColorAttributeName:UIColorMake(143, 143, 143),NSFontAttributeName:UIFontBoldMake(13),NSParagraphStyleAttributeName:[NSMutableParagraphStyle qmui_paragraphStyleWithLineHeight:0 lineBreakMode:NSLineBreakByTruncatingTail]}; - alertControllerAppearance.sheetMessageAttributeds = @{NSForegroundColorAttributeName:UIColorMake(143, 143, 143),NSFontAttributeName:UIFontMake(13),NSParagraphStyleAttributeName:[NSMutableParagraphStyle qmui_paragraphStyleWithLineHeight:0 lineBreakMode:NSLineBreakByTruncatingTail]}; - alertControllerAppearance.sheetButtonAttributeds = @{NSForegroundColorAttributeName:UIColorBlue,NSFontAttributeName:UIFontMake(20),NSKernAttributeName:@(0)}; - alertControllerAppearance.sheetButtonDisabledAttributeds = @{NSForegroundColorAttributeName:UIColorMake(129, 129, 129),NSFontAttributeName:UIFontMake(20),NSKernAttributeName:@(0)}; - alertControllerAppearance.sheetCancelButtonAttributeds = @{NSForegroundColorAttributeName:UIColorBlue,NSFontAttributeName:UIFontBoldMake(20),NSKernAttributeName:@(0)}; - alertControllerAppearance.sheetDestructiveButtonAttributeds = @{NSForegroundColorAttributeName:UIColorRed,NSFontAttributeName:UIFontMake(20),NSKernAttributeName:@(0)}; + alertControllerAppearance.sheetTitleAttributes = @{NSForegroundColorAttributeName:UIColorMake(143, 143, 143),NSFontAttributeName:UIFontBoldMake(13),NSParagraphStyleAttributeName:[NSMutableParagraphStyle qmui_paragraphStyleWithLineHeight:0 lineBreakMode:NSLineBreakByTruncatingTail]}; + alertControllerAppearance.sheetMessageAttributes = @{NSForegroundColorAttributeName:UIColorMake(143, 143, 143),NSFontAttributeName:UIFontMake(13),NSParagraphStyleAttributeName:[NSMutableParagraphStyle qmui_paragraphStyleWithLineHeight:0 lineBreakMode:NSLineBreakByTruncatingTail]}; + alertControllerAppearance.sheetButtonAttributes = @{NSForegroundColorAttributeName:UIColorBlue,NSFontAttributeName:UIFontMake(20),NSKernAttributeName:@(0)}; + alertControllerAppearance.sheetButtonDisabledAttributes = @{NSForegroundColorAttributeName:UIColorMake(129, 129, 129),NSFontAttributeName:UIFontMake(20),NSKernAttributeName:@(0)}; + alertControllerAppearance.sheetCancelButtonAttributes = @{NSForegroundColorAttributeName:UIColorBlue,NSFontAttributeName:UIFontBoldMake(20),NSKernAttributeName:@(0)}; + alertControllerAppearance.sheetDestructiveButtonAttributes = @{NSForegroundColorAttributeName:UIColorRed,NSFontAttributeName:UIFontMake(20),NSKernAttributeName:@(0)}; alertControllerAppearance.sheetContentCornerRadius = (IOS_VERSION >= 9.0 ? 13 : 6); alertControllerAppearance.sheetButtonHeight = (IOS_VERSION >= 9.0 ? 57 : 44); alertControllerAppearance.sheetCancelButtonMarginTop = 8; @@ -231,12 +231,12 @@ - (void)didInitialized { self.alertContentMaximumWidth = [QMUIAlertController appearance].alertContentMaximumWidth; self.alertSeperatorColor = [QMUIAlertController appearance].alertSeperatorColor; self.alertContentCornerRadius = [QMUIAlertController appearance].alertContentCornerRadius; - self.alertTitleAttributeds = [QMUIAlertController appearance].alertTitleAttributeds; - self.alertMessageAttributeds = [QMUIAlertController appearance].alertMessageAttributeds; - self.alertButtonAttributeds = [QMUIAlertController appearance].alertButtonAttributeds; - self.alertButtonDisabledAttributeds = [QMUIAlertController appearance].alertButtonDisabledAttributeds; - self.alertCancelButtonAttributeds = [QMUIAlertController appearance].alertCancelButtonAttributeds; - self.alertDestructiveButtonAttributeds = [QMUIAlertController appearance].alertDestructiveButtonAttributeds; + self.alertTitleAttributes = [QMUIAlertController appearance].alertTitleAttributes; + self.alertMessageAttributes = [QMUIAlertController appearance].alertMessageAttributes; + self.alertButtonAttributes = [QMUIAlertController appearance].alertButtonAttributes; + self.alertButtonDisabledAttributes = [QMUIAlertController appearance].alertButtonDisabledAttributes; + self.alertCancelButtonAttributes = [QMUIAlertController appearance].alertCancelButtonAttributes; + self.alertDestructiveButtonAttributes = [QMUIAlertController appearance].alertDestructiveButtonAttributes; self.alertButtonHeight = [QMUIAlertController appearance].alertButtonHeight; self.alertHeaderBackgroundColor = [QMUIAlertController appearance].alertHeaderBackgroundColor; self.alertButtonBackgroundColor = [QMUIAlertController appearance].alertButtonBackgroundColor; @@ -247,12 +247,12 @@ - (void)didInitialized { self.sheetContentMargin = [QMUIAlertController appearance].sheetContentMargin; self.sheetContentMaximumWidth = [QMUIAlertController appearance].sheetContentMaximumWidth; self.sheetSeperatorColor = [QMUIAlertController appearance].sheetSeperatorColor; - self.sheetTitleAttributeds = [QMUIAlertController appearance].sheetTitleAttributeds; - self.sheetMessageAttributeds = [QMUIAlertController appearance].sheetMessageAttributeds; - self.sheetButtonAttributeds = [QMUIAlertController appearance].sheetButtonAttributeds; - self.sheetButtonDisabledAttributeds = [QMUIAlertController appearance].sheetButtonDisabledAttributeds; - self.sheetCancelButtonAttributeds = [QMUIAlertController appearance].sheetCancelButtonAttributeds; - self.sheetDestructiveButtonAttributeds = [QMUIAlertController appearance].sheetDestructiveButtonAttributeds; + self.sheetTitleAttributes = [QMUIAlertController appearance].sheetTitleAttributes; + self.sheetMessageAttributes = [QMUIAlertController appearance].sheetMessageAttributes; + self.sheetButtonAttributes = [QMUIAlertController appearance].sheetButtonAttributes; + self.sheetButtonDisabledAttributes = [QMUIAlertController appearance].sheetButtonDisabledAttributes; + self.sheetCancelButtonAttributes = [QMUIAlertController appearance].sheetCancelButtonAttributes; + self.sheetDestructiveButtonAttributes = [QMUIAlertController appearance].sheetDestructiveButtonAttributes; self.sheetCancelButtonMarginTop = [QMUIAlertController appearance].sheetCancelButtonMarginTop; self.sheetContentCornerRadius = [QMUIAlertController appearance].sheetContentCornerRadius; self.sheetButtonHeight = [QMUIAlertController appearance].sheetButtonHeight; @@ -264,43 +264,43 @@ - (void)didInitialized { } } -- (void)setAlertButtonAttributeds:(NSDictionary *)alertButtonAttributeds { - _alertButtonAttributeds = alertButtonAttributeds; +- (void)setAlertButtonAttributes:(NSDictionary *)alertButtonAttributes { + _alertButtonAttributes = alertButtonAttributes; _needsUpdateAction = YES; } -- (void)setSheetButtonAttributeds:(NSDictionary *)sheetButtonAttributeds { - _sheetButtonAttributeds = sheetButtonAttributeds; +- (void)setSheetButtonAttributes:(NSDictionary *)sheetButtonAttributes { + _sheetButtonAttributes = sheetButtonAttributes; _needsUpdateAction = YES; } -- (void)setAlertButtonDisabledAttributeds:(NSDictionary *)alertButtonDisabledAttributeds { - _alertButtonDisabledAttributeds = alertButtonDisabledAttributeds; +- (void)setAlertButtonDisabledAttributes:(NSDictionary *)alertButtonDisabledAttributes { + _alertButtonDisabledAttributes = alertButtonDisabledAttributes; _needsUpdateAction = YES; } -- (void)setSheetButtonDisabledAttributeds:(NSDictionary *)sheetButtonDisabledAttributeds { - _sheetButtonDisabledAttributeds = sheetButtonDisabledAttributeds; +- (void)setSheetButtonDisabledAttributes:(NSDictionary *)sheetButtonDisabledAttributes { + _sheetButtonDisabledAttributes = sheetButtonDisabledAttributes; _needsUpdateAction = YES; } -- (void)setAlertCancelButtonAttributeds:(NSDictionary *)alertCancelButtonAttributeds { - _alertCancelButtonAttributeds = alertCancelButtonAttributeds; +- (void)setAlertCancelButtonAttributes:(NSDictionary *)alertCancelButtonAttributes { + _alertCancelButtonAttributes = alertCancelButtonAttributes; _needsUpdateAction = YES; } -- (void)setSheetCancelButtonAttributeds:(NSDictionary *)sheetCancelButtonAttributeds { - _sheetCancelButtonAttributeds = sheetCancelButtonAttributeds; +- (void)setSheetCancelButtonAttributes:(NSDictionary *)sheetCancelButtonAttributes { + _sheetCancelButtonAttributes = sheetCancelButtonAttributes; _needsUpdateAction = YES; } -- (void)setAlertDestructiveButtonAttributeds:(NSDictionary *)alertDestructiveButtonAttributeds { - _alertDestructiveButtonAttributeds = alertDestructiveButtonAttributeds; +- (void)setAlertDestructiveButtonAttributes:(NSDictionary *)alertDestructiveButtonAttributes { + _alertDestructiveButtonAttributes = alertDestructiveButtonAttributes; _needsUpdateAction = YES; } -- (void)setSheetDestructiveButtonAttributeds:(NSDictionary *)sheetDestructiveButtonAttributeds { - _sheetDestructiveButtonAttributeds = sheetDestructiveButtonAttributeds; +- (void)setSheetDestructiveButtonAttributes:(NSDictionary *)sheetDestructiveButtonAttributes { + _sheetDestructiveButtonAttributes = sheetDestructiveButtonAttributes; _needsUpdateAction = YES; } @@ -324,23 +324,23 @@ - (void)setSheetButtonHighlightBackgroundColor:(UIColor *)sheetButtonHighlightBa _needsUpdateAction = YES; } -- (void)setAlertTitleAttributeds:(NSDictionary *)alertTitleAttributeds { - _alertTitleAttributeds = alertTitleAttributeds; +- (void)setAlertTitleAttributes:(NSDictionary *)alertTitleAttributes { + _alertTitleAttributes = alertTitleAttributes; _needsUpdateTitle = YES; } -- (void)setAlertMessageAttributeds:(NSDictionary *)alertMessageAttributeds { - _alertMessageAttributeds = alertMessageAttributeds; +- (void)setAlertMessageAttributes:(NSDictionary *)alertMessageAttributes { + _alertMessageAttributes = alertMessageAttributes; _needsUpdateMessage = YES; } -- (void)setSheetTitleAttributeds:(NSDictionary *)sheetTitleAttributeds { - _sheetTitleAttributeds = sheetTitleAttributeds; +- (void)setSheetTitleAttributes:(NSDictionary *)sheetTitleAttributes { + _sheetTitleAttributes = sheetTitleAttributes; _needsUpdateTitle = YES; } -- (void)setSheetMessageAttributeds:(NSDictionary *)sheetMessageAttributeds { - _sheetMessageAttributeds = sheetMessageAttributeds; +- (void)setSheetMessageAttributes:(NSDictionary *)sheetMessageAttributes { + _sheetMessageAttributes = sheetMessageAttributes; _needsUpdateMessage = YES; } @@ -937,7 +937,7 @@ - (NSString *)title { - (void)updateTitleLabel { if (self.titleLabel && !self.titleLabel.hidden) { - NSAttributedString *attributeString = [[NSAttributedString alloc] initWithString:self.title attributes:self.preferredStyle == QMUIAlertControllerStyleAlert ? self.alertTitleAttributeds : self.sheetTitleAttributeds]; + NSAttributedString *attributeString = [[NSAttributedString alloc] initWithString:self.title attributes:self.preferredStyle == QMUIAlertControllerStyleAlert ? self.alertTitleAttributes : self.sheetTitleAttributes]; self.titleLabel.attributedText = attributeString; self.titleLabel.textAlignment = NSTextAlignmentCenter; } @@ -960,7 +960,7 @@ - (void)setMessage:(NSString *)message { - (void)updateMessageLabel { if (self.messageLabel && !self.messageLabel.hidden) { - NSAttributedString *attributeString = [[NSAttributedString alloc] initWithString:self.message attributes:self.preferredStyle == QMUIAlertControllerStyleAlert ? self.alertMessageAttributeds : self.sheetMessageAttributeds]; + NSAttributedString *attributeString = [[NSAttributedString alloc] initWithString:self.message attributes:self.preferredStyle == QMUIAlertControllerStyleAlert ? self.alertMessageAttributes : self.sheetMessageAttributes]; self.messageLabel.attributedText = attributeString; self.messageLabel.textAlignment = NSTextAlignmentCenter; } @@ -981,15 +981,15 @@ - (void)updateAction { NSAttributedString *attributeString = nil; if (alertAction.style == QMUIAlertActionStyleCancel) { - attributeString = [[NSAttributedString alloc] initWithString:alertAction.title attributes:self.preferredStyle == QMUIAlertControllerStyleAlert ? self.alertCancelButtonAttributeds : self.sheetCancelButtonAttributeds]; + attributeString = [[NSAttributedString alloc] initWithString:alertAction.title attributes:self.preferredStyle == QMUIAlertControllerStyleAlert ? self.alertCancelButtonAttributes : self.sheetCancelButtonAttributes]; } else if (alertAction.style == QMUIAlertActionStyleDestructive) { - attributeString = [[NSAttributedString alloc] initWithString:alertAction.title attributes:self.preferredStyle == QMUIAlertControllerStyleAlert ? self.alertDestructiveButtonAttributeds : self.sheetDestructiveButtonAttributeds]; + attributeString = [[NSAttributedString alloc] initWithString:alertAction.title attributes:self.preferredStyle == QMUIAlertControllerStyleAlert ? self.alertDestructiveButtonAttributes : self.sheetDestructiveButtonAttributes]; } else { - attributeString = [[NSAttributedString alloc] initWithString:alertAction.title attributes:self.preferredStyle == QMUIAlertControllerStyleAlert ? self.alertButtonAttributeds : self.sheetButtonAttributeds]; + attributeString = [[NSAttributedString alloc] initWithString:alertAction.title attributes:self.preferredStyle == QMUIAlertControllerStyleAlert ? self.alertButtonAttributes : self.sheetButtonAttributes]; } [alertAction.button setAttributedTitle:attributeString forState:UIControlStateNormal]; - attributeString = [[NSAttributedString alloc] initWithString:alertAction.title attributes:self.preferredStyle == QMUIAlertControllerStyleAlert ? self.alertButtonDisabledAttributeds : self.sheetButtonDisabledAttributeds]; + attributeString = [[NSAttributedString alloc] initWithString:alertAction.title attributes:self.preferredStyle == QMUIAlertControllerStyleAlert ? self.alertButtonDisabledAttributes : self.sheetButtonDisabledAttributes]; [alertAction.button setAttributedTitle:attributeString forState:UIControlStateDisabled]; if ([alertAction.button imageForState:UIControlStateNormal]) {