vtourraine / AcknowList

Acknowledgements screen displaying a list of licenses, for example from CocoaPods and Swift Package Manager dependencies.
MIT License
798 stars 60 forks source link

Dark mode support #55

Closed honkmaster closed 4 years ago

honkmaster commented 5 years ago

Some colors are hardcoded in AcknowList, e.g.

view.backgroundColor = UIColor.white

in AcknowViewController. This does not look good in iOS 13. Here, it should be something as

view.backgroundColor = UIColor.systemBackground

Same applies for all label colors etc. Thus, an update for Dark mode is required.

vtourraine commented 5 years ago

Hello Tobias, and thanks a lot for the raising that issue.

We should use the new “semantic” colors, of course, but in my testing, the current code is fine for iOS 13. I don’t see any visual errors when building with the Xcode 11 beta and turning on Dark Mode, because all visible elements are actually relying on default values. If that’s different for you, could you be more specific (with a screenshot, maybe)?

In the meantime, I’ve created a new branch that removes some unnecessary hard-coded colors. The white background you mentioned, for instance, is actually hidden by the text view with its default background color value. The only hard-coded color left is the gray for the header and footer, which isn’t really a problem with Dark Mode: https://github.com/vtourraine/AcknowList/tree/dark-mode-colors

jalbano commented 4 years ago

Related to this, I'd like to be able to control the status bar color (light vs. dark) for the view controllers. I can subclass the main one but the ones that get pushed within your code are out of my reach.

vtourraine commented 4 years ago

@jalbano Thanks for the feedback! You’re right, it should be easier to customize this kind of thing. I guess for now you could override the tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) method, to instantiate your own detail view controller?