Skip to content

textLabel & dotsView in CalendarDayCell did not work with style #147

@leson1106

Description

@leson1106

New Issue Checklist

Issue Description

It seems like cellFont and cellEventColor were incorrect even if I configured them with CalendarView.Style(). I already tried on default ViewController.

style.cellEventColor = .blue
style.cellFont = UIFont(name: "Helvetica", size: 11.0) UIFont.systemFont(ofSize: 11.0)

It didn't change at all

IMG_1917

Solution
I've read the code, and the root cause is that CalendarDayCell was initialized and set cellFont and cellEventColor before dayCell.style = style was assigned in CalendarView+DataSource.
I created a PR here #146. You may want to take a look. It works fine then.

IMG_1918

Environment

XCode version: 14.3
Swift version: 5.0
KDCalendar version: 1.8.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions