richardtop / CalendarKit

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

Can we send pressed location along with view reference when we click on an event #268

Closed twinklenotna closed 3 years ago

twinklenotna commented 3 years ago

New Issue Checklist

Issue Description

I want to know the pressed location along with the event view reference when I click on event in day view.

Result I am trying to achieve

override func dayView(dayView _: DayView, didTapTimelineAt time: Date, eventView: EventView) { }

richardtop commented 3 years ago

Could you please elaborate on why do you need this feature? I'm planning to introduce a custom EventView class support, which might be difficult to add in case there is an interface as you propose.

twinklenotna commented 3 years ago

@richardtop I am trying to implement addEvent functionality and in the add event dialog I want to automatically set the start date of the event to didTapTimelineAt. Also, I am calling this addEvent functionality when we click on the specific types of events only. So it is adding an event on top of another event. That why I need the above function.

richardtop commented 3 years ago

Please, take a look at the example, where such functionality has been already implemented, so that you could re-use it out-of-the-box.