Skip to content

Commit

Permalink
Merge pull request Tencent#34 from nero-tang/master
Browse files Browse the repository at this point in the history
Fix incorrect property naming
  • Loading branch information
zhoon authored Jan 16, 2017
2 parents 6fafed7 + 6c65caf commit 03a9da0
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 74 deletions.
2 changes: 1 addition & 1 deletion QMUIKit/UIComponents/QMUIDialogViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<NSString *, id> *buttonTitleAttributeds UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *buttonTitleAttributes UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) UIColor *buttonHighlightedBackgroundColor UI_APPEARANCE_SELECTOR;

@property(nonatomic, strong, readonly) UIView *headerView;
Expand Down
14 changes: 7 additions & 7 deletions QMUIKit/UIComponents/QMUIDialogViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
});
Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -151,13 +151,13 @@ - (void)setFooterViewBackgroundColor:(UIColor *)footerViewBackgroundColor {
self.footerView.backgroundColor = footerViewBackgroundColor;
}

- (void)setButtonTitleAttributeds:(NSDictionary<NSString *,id> *)buttonTitleAttributeds {
_buttonTitleAttributeds = buttonTitleAttributeds;
- (void)setButtonTitleAttributes:(NSDictionary<NSString *,id> *)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];
}
}

Expand Down Expand Up @@ -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;
}

Expand Down
24 changes: 12 additions & 12 deletions QMUIKit/UIKitExtensions/QMUIAlertController.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<NSString *, id> *alertTitleAttributeds UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *alertMessageAttributeds UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *alertButtonAttributeds UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *alertButtonDisabledAttributeds UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *alertCancelButtonAttributeds UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *alertDestructiveButtonAttributeds UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *alertTitleAttributes UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *alertMessageAttributes UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *alertButtonAttributes UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *alertButtonDisabledAttributes UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *alertCancelButtonAttributes UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *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;
Expand All @@ -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<NSString *, id> *sheetTitleAttributeds UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *sheetMessageAttributeds UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *sheetButtonAttributeds UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *sheetButtonDisabledAttributeds UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *sheetCancelButtonAttributeds UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *sheetDestructiveButtonAttributeds UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *sheetTitleAttributes UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *sheetMessageAttributes UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *sheetButtonAttributes UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *sheetButtonDisabledAttributes UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *sheetCancelButtonAttributes UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) NSDictionary<NSString *, id> *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;
Expand Down
Loading

0 comments on commit 03a9da0

Please sign in to comment.