zjfjack / JZCalendarWeekView

Calendar Week & Day View in iOS Swift
MIT License
448 stars 120 forks source link

currentMovingCell public property added to JZLongPressWeekView #139

Open pableiros opened 3 years ago

pableiros commented 3 years ago

I need the currentMovingCell to solve a weird animation occurs when moving an event on the same date of another event.

I do this to solve the weird animation:

 // MARK: - JZLongPressViewDelegate

func weekView(_ weekView: JZLongPressWeekView, editingEvent: JZBaseEvent, didEndMoveLongPressAt startDate: Date) {
    weekView.currentMovingCell.contentView.isHidden = true
    ...
}
// JZLongPressWeekView
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
    ...

    cell.contentView.isHidden = false

    ...
}