Skip to content

Adds support for dark-mode and accessibility starting with iOS 13.#109

Open
cmriboldi wants to merge 1 commit intozjfjack:masterfrom
cmriboldi:dark-mode
Open

Adds support for dark-mode and accessibility starting with iOS 13.#109
cmriboldi wants to merge 1 commit intozjfjack:masterfrom
cmriboldi:dark-mode

Conversation

@cmriboldi
Copy link

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!

…evious versions of iOS will work same as before.
@zjfjack
Copy link
Owner

zjfjack commented Oct 15, 2019

@cmriboldi Thanks for the pr. It looks good to me.
Although JZWeekViewColors should be changed in the future, it is a fantastic solution now.
I am quite busy recently, I will try these colors first and merge it asap.

@eduardo3150
Copy link

@zjfjack, Hey ✋ when will this get merged?

@Stanley-Jovel
Copy link

The same here, wondering if this will get merged anytime soon.

@zjfjack
Copy link
Owner

zjfjack commented Feb 18, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants