@@ -341,6 +341,9 @@ - (instancetype)init {
341
341
#ifdef __IPHONE_13_0
342
342
_secondaryColor = [UIColor secondaryLabelColor ];
343
343
_failureColor = [UIColor systemRedColor ];
344
+ #else
345
+ _secondaryColor = [UIColor colorWithRed: 118.0 / 255.0 green: 118.0 / 255.0 blue: 122.0 / 255.0 alpha: 1.0 ];
346
+ _failureColor = [UIColor colorWithRed: 218.0 / 255.0 green: 53.0 / 255.0 blue: 71.0 / 255.0 alpha: 1.0 ];
344
347
#endif
345
348
} else {
346
349
_secondaryColor = [UIColor colorWithRed: 118.0 / 255.0 green: 118.0 / 255.0 blue: 122.0 / 255.0 alpha: 1.0 ];
@@ -462,16 +465,22 @@ - (void)inheritDefaultColors {
462
465
_backgroundColor = self.backgroundColor ?: [UIColor systemBackgroundColor ];
463
466
_collectionBackgroundColor = self.collectionBackgroundColor ?: [UIColor systemGroupedBackgroundColor ];
464
467
_placeholderColor = self.placeholderColor ?: [UIColor placeholderTextColor ];
468
+ #else
469
+ [self inheritAppearanceColors ];
465
470
#endif
466
471
} else {
467
- _primaryColor = self.primaryColor ?: [self appearanceColorForClass: [UILabel class ] property: @selector (textColor ) default: [UIColor blackColor ]];
468
- _separatorColor = self.separatorColor ?: [self appearanceColorForClass: [UITableView class ] property: @selector (separatorColor ) default: [UIColor colorWithRed: 199.0 / 255.0 green: 200.0 / 255.0 blue: 204.0 / 255.0 alpha: 1.0 ]];
469
- _backgroundColor = self.backgroundColor ?: [self appearanceColorForClass: [UITableViewCell class ] property: @selector (backgroundColor ) default: [UIColor whiteColor ]];
470
- _collectionBackgroundColor = self.collectionBackgroundColor ?: [self appearanceColorForClass: [UITableView class ] property: @selector (backgroundColor ) default: [UIColor groupTableViewBackgroundColor ]];
471
- _placeholderColor = self.placeholderColor ?: [UIColor colorWithRed: 0 green: 0 blue: 25.0 / 255.0 alpha: 56.0 / 255.0 ];
472
+ [self inheritAppearanceColors ];
472
473
}
473
474
}
474
475
476
+ - (void )inheritAppearanceColors {
477
+ _primaryColor = self.primaryColor ?: [self appearanceColorForClass: [UILabel class ] property: @selector (textColor ) default: [UIColor blackColor ]];
478
+ _separatorColor = self.separatorColor ?: [self appearanceColorForClass: [UITableView class ] property: @selector (separatorColor ) default: [UIColor colorWithRed: 199.0 / 255.0 green: 200.0 / 255.0 blue: 204.0 / 255.0 alpha: 1.0 ]];
479
+ _backgroundColor = self.backgroundColor ?: [self appearanceColorForClass: [UITableViewCell class ] property: @selector (backgroundColor ) default: [UIColor whiteColor ]];
480
+ _collectionBackgroundColor = self.collectionBackgroundColor ?: [self appearanceColorForClass: [UITableView class ] property: @selector (backgroundColor ) default: [UIColor groupTableViewBackgroundColor ]];
481
+ _placeholderColor = self.placeholderColor ?: [UIColor colorWithRed: 0 green: 0 blue: 25.0 / 255.0 alpha: 56.0 / 255.0 ];
482
+ }
483
+
475
484
- (void )setFontDescriptor : (UIFontDescriptor *)fontDescriptor forStyle : (ApptentiveStyleIdentifier)textStyle {
476
485
ApptentiveDictionarySetKeyValue (self.fontDescriptorOverrides , textStyle, fontDescriptor);
477
486
}
0 commit comments