1

I use the CalendarKit cocoapods

I want to have a space between date view and timeline view.

But I only find a way that is changing the y value in the code below

override public func layoutSubviews() {
    super.layoutSubviews()
    dayHeaderView.frame = CGRect(origin: CGPoint(x: 0, y: layoutMargins.top),
                                 size: CGSize(width: bounds.width, height: headerHeight))
    let timelinePagerHeight = bounds.height - dayHeaderView.frame.maxY
    timelinePagerView.frame = CGRect(origin: CGPoint(x: 0, y: dayHeaderView.frame.maxY),
                                     size: CGSize(width: bounds.width, height: timelinePagerHeight))
  }

It's in cocoapods ...

How can I change it in my own swift file?

Or there is another way to change?

My ideal view is like this below

enter image description here

Alice Wei
  • 21
  • 2

1 Answers1

1

You'll need to fork the library (create your own repository with the CalendarKit code) and make your edits there. CalendarKit doesn't support such customization out of the box, so you'll have to maintain your own version of it.

Richard Topchii
  • 7,075
  • 8
  • 48
  • 115