diff --git a/ImageViewer/ViewController.swift b/ImageViewer/ViewController.swift index b5be9a3..071e552 100644 --- a/ImageViewer/ViewController.swift +++ b/ImageViewer/ViewController.swift @@ -2123,6 +2123,7 @@ struct ComicOptionItem { class ComicOptionViewController: UITableViewController { private let items: [ComicOptionItem] + private var defaultTextColor: UIColor? init(title: String, items: [ComicOptionItem]) { self.items = items @@ -2155,6 +2156,9 @@ class ComicOptionViewController: UITableViewController { let item = items[indexPath.row] cell.textLabel?.text = item.title cell.accessoryType = item.children != nil ? .disclosureIndicator : .none + if cell.textLabel?.textColor != .red && cell.textLabel?.textColor != .gray { + defaultTextColor = cell.textLabel?.textColor + } let available = item.available() @@ -2164,7 +2168,7 @@ class ComicOptionViewController: UITableViewController { if item.destructive { cell.textLabel?.textColor = .red } else { - cell.textLabel?.textColor = .white + cell.textLabel?.textColor = defaultTextColor ?? .black } } else { cell.textLabel?.textColor = .gray