Adds support for dark-mode and accessibility starting with iOS 13. #109
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previous versions of iOS will work the same as before.
The color mapping that I used in the JZWeekViewColor is as follows.
UIColor.white --> systemBackground all used to color backgrounds
columnHeaderWeekday: UIColor { return UIColor(hex: 0x757575) } --> secondaryLabel
columnHeaderDay: UIColor { return UIColor(hex: 0x757575) } --> secondaryLabel
allDayHeader: UIColor { return UIColor(hex: 0x757575) } --> secondaryLabel
rowHeaderTime: UIColor { return UIColor(hex: 0x999999) } --> tertiaryLabel
gridLine: UIColor { return UIColor.lightGray } --> separator
today: UIColor { return UIColor(hex: 0x0089FF) } --> systemBlue
appleCalendarRed: UIColor { return UIColor(hex: 0xFC3D39) } --> systemRed
If you have any questions feel free to reach out. This is a fix that we're using at the company I'm working at in order to fully support dark mode and accessibility in our app. Hopefully, it's pretty straightforward.
I renamed a lot of the colors to be more semantic to match the new iOS UIColor naming conventions (with the exception of blue and red). There's a good article on that here. https://nshipster.com/dark-mode/
Thanks so much for your hard work on this pod!