@@ -66,6 +66,7 @@ @implementation IASKAppSettingsViewController
6666@synthesize childPaneHandler = _childPaneHandler;
6767@synthesize currentFirstResponder = _currentFirstResponder;
6868@synthesize listParentViewController;
69+ @synthesize colorScheme = _colorScheme;
6970
7071#pragma mark accessors
7172- (IASKSettingsReader*)settingsReader {
@@ -116,6 +117,18 @@ - (void)setFile:(NSString *)file {
116117 }
117118}
118119
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+
119132- (void )createSelections {
120133 NSMutableArray *sectionSelection = [NSMutableArray new ];
121134 for (int section = 0 ; section < self.settingsReader .numberOfSections ; section++) {
@@ -649,14 +662,14 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
649662
650663 BOOL hasTitle = title.length > 0 && !specifier.isItemSpecifier ;
651664 cell.detailTextLabel .text = [[specifier titleForCurrentValue: currentValue ?: specifier.defaultValue] description ];
652- cell.detailTextLabel .textColor = self.tintColor ;
665+ cell.detailTextLabel .textColor = self.detailTextColor ;
653666 if (hasTitle) {
654667 cell.textLabel .text = title;
655668 } else {
656669 cell.textLabel .text = cell.detailTextLabel .text ;
657670 cell.detailTextLabel .text = nil ;
658671
659- if (!specifier.parentSpecifier ) {
672+ if (!specifier.parentSpecifier && self. colorScheme == IASKColorSchemeTinted ) {
660673 cell.textLabel .textColor = self.tintColor ;
661674 }
662675 }
@@ -698,7 +711,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
698711 }
699712 cell.userInteractionEnabled = [specifier.type isEqualToString: kIASKDatePickerSpecifier ];
700713 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+ }
702718 }
703719 }
704720 else if ([specifier.type isEqualToString: kIASKPSTextFieldSpecifier ]) {
@@ -766,7 +782,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
766782 cell.textLabel .text = [self .settingsReader titleForId: valueString];
767783 } else {
768784 cell.detailTextLabel .text = [self .settingsReader titleForId: valueString];
769- cell.detailTextLabel .textColor = self.tintColor ;
785+ cell.detailTextLabel .textColor = self.detailTextColor ;
770786 }
771787 }
772788 }
@@ -1061,6 +1077,7 @@ - (void)presentChildViewController:(UITableViewController<IASKViewController> *)
10611077 targetViewController.tableView .cellLayoutMarginsFollowReadableWidth = self.cellLayoutMarginsFollowReadableWidth ;
10621078 _currentChildViewController = targetViewController;
10631079 targetViewController.settingsStore = self.settingsStore ;
1080+ targetViewController.colorScheme = self.colorScheme ;
10641081 targetViewController.view .tintColor = self.tintColor ;
10651082 if ([specifier.parentSpecifier.type isEqualToString: kIASKListGroupSpecifier ]) {
10661083 NSDictionary *itemDict = @{};
0 commit comments