richardtop / CalendarKit

📅 Calendar for Apple platforms in Swift
https://www.youtube.com/watch?v=cJ63-_z1qg8
MIT License
2.48k stars 333 forks source link

How to align "non-overlapped" events on 1 column? #357

Open hung-zappasoft opened 1 year ago

hung-zappasoft commented 1 year ago

I would like to make events which are not overlapped each other to stay on 1 column as described in the following screenshot. How could I do that? Thank you for your help

Screenshot 2023-05-22 at 5 36 03 pm
richardtop commented 1 year ago

Related to #113

To achieve your goal, feel free to fork the library (i.e. create your own modified version of this library) and modify the events layout algorithm to the one you wish. The event layout algorithm is available in the TimelineView here: https://github.com/richardtop/CalendarKit/blob/master/Sources/Timeline/TimelineView.swift#L394

This will be possible without forking the library with the introduction of a pluggable/custom layout algorithm injection.