@@ -522,8 +522,9 @@ - (void)initProperties {
522
522
self.effectStyle = UIBlurEffectStyleExtraLight;
523
523
}
524
524
525
- NSString *titleColor = _preferredStyle == TLAlertControllerStyleAlert ? @" #101010" : @" #878889" ;
526
- NSString *msgeColor = _preferredStyle == TLAlertControllerStyleAlert ? @" #181818" : @" #959698" ;
525
+ BOOL isAlert = _preferredStyle == TLAlertControllerStyleAlert;
526
+ NSString *titleColor = isAlert ? @" #101010" : @" #878889" ;
527
+ NSString *msgeColor = isAlert ? @" #181818" : @" #959698" ;
527
528
528
529
self.separatorColor = [TLAlertController colorWithHex: isDarkMode ? @" #999" : @" #AAA" ];
529
530
self.titleColor = [TLAlertController colorWithHex: isDarkMode ? @" #FFF" : titleColor];
@@ -532,19 +533,19 @@ - (void)initProperties {
532
533
self.textColorOfCancel = [TLAlertController colorWithHex: @" #097FFF" ];
533
534
self.textColorOfDestructive = [TLAlertController colorWithHex: @" #FF4238" ];
534
535
535
- self.titleFont = [UIFont boldSystemFontOfSize: 13 ];
536
+ self.titleFont = [UIFont systemFontOfSize: (isAlert ? 17 : 13 ) weight: UIFontWeightSemibold ];
536
537
self.messageFont = [UIFont systemFontOfSize: 13 ];
537
538
self.textFontOfDefault = [UIFont systemFontOfSize: 17 ];
538
- self.textFontOfCancel = [UIFont boldSystemFontOfSize :17 ];
539
+ self.textFontOfCancel = [UIFont systemFontOfSize :17 weight: isAlert ? UIFontWeightRegular : UIFontWeightSemibold ];
539
540
self.textFontOfDestructive = [UIFont systemFontOfSize: 17 ];
540
541
541
542
self.actionBgColorOfHighlighted = [UIColor colorWithWhite: 0 alpha: isDarkMode ? 0.13 : 0.04 ];
542
543
self.backgroundColorOfCancelView = [TLAlertController colorWithHex: isDarkMode ? @" #2C2C2E" : @" #FFF" ];;
543
544
544
545
self.btns = [NSMutableDictionary dictionary ];
545
546
546
- self.rowHeight = _preferredStyle == TLAlertControllerStyleAlert ? kAlertRowHeight : kRowHeight ;
547
- self.separatorLineHeight = _preferredStyle == TLAlertControllerStyleAlert ? kAlertSeparatorLineHeight : kSeparatorLineHeight ;
547
+ self.rowHeight = isAlert ? kAlertRowHeight : kRowHeight ;
548
+ self.separatorLineHeight = isAlert ? kAlertSeparatorLineHeight : kSeparatorLineHeight ;
548
549
549
550
self.cornerRadius = kCornerRadius ;
550
551
self.margin = kMargin ;
0 commit comments