zjfjack / JZCalendarWeekView

Calendar Week & Day View in iOS Swift
MIT License
448 stars 120 forks source link

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

Open cmriboldi opened 4 years ago

cmriboldi commented 4 years ago

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!

zjfjack commented 4 years ago

@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 commented 4 years ago

@zjfjack, Hey ✋ when will this get merged?

Stanley-Jovel commented 4 years ago

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

zjfjack commented 4 years ago

I will try to restart some work recently. I stopped updating this project for a while. Hopefully next week.

On Wed, 19 Feb 2020 at 10:44, Eduardo Chavez notifications@github.com wrote:

@zjfjack https://github.com/zjfjack, Hey ✋ when will this get merged?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zjfjack/JZCalendarWeekView/pull/109?email_source=notifications&email_token=ABEWYPRIGIEXOVM4XSEKZCDRDRXFJA5CNFSM4I5IRAD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMFZEFI#issuecomment-587960853, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEWYPXH2CEVYJL42IPXURLRDRXFJANCNFSM4I5IRADQ .