@@ -66,6 +66,7 @@ @implementation IASKAppSettingsViewController
66
66
@synthesize childPaneHandler = _childPaneHandler;
67
67
@synthesize currentFirstResponder = _currentFirstResponder;
68
68
@synthesize listParentViewController;
69
+ @synthesize colorScheme = _colorScheme;
69
70
70
71
#pragma mark accessors
71
72
- (IASKSettingsReader*)settingsReader {
@@ -116,6 +117,18 @@ - (void)setFile:(NSString *)file {
116
117
}
117
118
}
118
119
120
+ - (UIColor*)detailTextColor {
121
+ if (self.colorScheme == IASKColorSchemeSystem) {
122
+ if (@available (iOS 13.0 , *)) {
123
+ return UIColor.secondaryLabelColor ;
124
+ } else {
125
+ return [UIColor colorWithRed: 0.235294 green: 0.235294 blue: 0.262745 alpha: 0.6 ];
126
+ }
127
+ } else {
128
+ return self.tintColor ;
129
+ }
130
+ }
131
+
119
132
- (void )createSelections {
120
133
NSMutableArray *sectionSelection = [NSMutableArray new ];
121
134
for (int section = 0 ; section < self.settingsReader .numberOfSections ; section++) {
@@ -649,14 +662,14 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
649
662
650
663
BOOL hasTitle = title.length > 0 && !specifier.isItemSpecifier ;
651
664
cell.detailTextLabel .text = [[specifier titleForCurrentValue: currentValue ?: specifier.defaultValue] description ];
652
- cell.detailTextLabel .textColor = self.tintColor ;
665
+ cell.detailTextLabel .textColor = self.detailTextColor ;
653
666
if (hasTitle) {
654
667
cell.textLabel .text = title;
655
668
} else {
656
669
cell.textLabel .text = cell.detailTextLabel .text ;
657
670
cell.detailTextLabel .text = nil ;
658
671
659
- if (!specifier.parentSpecifier ) {
672
+ if (!specifier.parentSpecifier && self. colorScheme == IASKColorSchemeTinted ) {
660
673
cell.textLabel .textColor = self.tintColor ;
661
674
}
662
675
}
@@ -698,7 +711,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
698
711
}
699
712
cell.userInteractionEnabled = [specifier.type isEqualToString: kIASKDatePickerSpecifier ];
700
713
if ([specifier.type isEqualToString: kIASKDatePickerSpecifier ]) {
701
- cell.detailTextLabel .textColor = [specifier isEqual: self .settingsReader.selectedSpecifier] ? [UILabel appearanceWhenContainedInInstancesOfClasses: @[UITableViewCell.class]].textColor : self.tintColor ;
714
+ cell.detailTextLabel .textColor = self.detailTextColor ;
715
+ if ([specifier isEqual: self .settingsReader.selectedSpecifier]) {
716
+ cell.detailTextLabel .textColor = [UILabel appearanceWhenContainedInInstancesOfClasses: @[UITableViewCell.class]].textColor ;
717
+ }
702
718
}
703
719
}
704
720
else if ([specifier.type isEqualToString: kIASKPSTextFieldSpecifier ]) {
@@ -766,7 +782,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
766
782
cell.textLabel .text = [self .settingsReader titleForId: valueString];
767
783
} else {
768
784
cell.detailTextLabel .text = [self .settingsReader titleForId: valueString];
769
- cell.detailTextLabel .textColor = self.tintColor ;
785
+ cell.detailTextLabel .textColor = self.detailTextColor ;
770
786
}
771
787
}
772
788
}
@@ -1061,6 +1077,7 @@ - (void)presentChildViewController:(UITableViewController<IASKViewController> *)
1061
1077
targetViewController.tableView .cellLayoutMarginsFollowReadableWidth = self.cellLayoutMarginsFollowReadableWidth ;
1062
1078
_currentChildViewController = targetViewController;
1063
1079
targetViewController.settingsStore = self.settingsStore ;
1080
+ targetViewController.colorScheme = self.colorScheme ;
1064
1081
targetViewController.view .tintColor = self.tintColor ;
1065
1082
if ([specifier.parentSpecifier.type isEqualToString: kIASKListGroupSpecifier ]) {
1066
1083
NSDictionary *itemDict = @{};
0 commit comments