I have a UITableViewController with a grouped table view. No matter what I try, I can't match dark mode colors of native Settings app of iOS 14. I tried the following:
self.tableView.backgroundColor = UIColor.systemGroupedBackground
And in cellForItemAtIndexPath, I set
cell.backgroundColor = UIColor.secondarySystemGroupedBackground
This matches colors for light mode but not for dark mode.
CodePudding user response:
The system colors work differently when view controller is presented modally as form sheet compared vs full screen. The look matches Settings app in dark mode when view controller's presentationStyle is overFullScreen. In other cases such as automatic, system colors are lighter!