Search code examples
iosobjective-cswiftcocoapods

CocoaPods calendar view issue


I found this CocoaPods CalendarView library written in Objective-c.

I use it in my Swift project as below:

guard let calendar = CalendarView(position: 0, y: 0) else { return }
self.view.addSubview(calendar)

The result I expect to see is below:

enter image description here

But I am getting days without a top part where year and month are displayed:

enter image description here

So I see the weekdays bar, days. But I would like to see the top bar too.

I tried setting mode to Default but it does not help.

EDITED: When I enable headers as @Awais suggested I see overlay issue and calendar refresh resolve it.

enter image description here


Solution

  • Apparently shouldShowHeaders is no longer set to YES in the latest release of that pod when calendar view is loaded as shown in the screenshot below.

    Setting the property shouldShowHeaders to true after creating the calendar instance should resolve this issue.

    Library Github