Skip to content

Commit e09c9d5

Browse files
committed
[FEAT]: 셀 이동 시 부드러운 애니메이션 및 이동한 셀을 가운데 화면으로 포커싱하는 기능 추가
1 parent b1569c0 commit e09c9d5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Feature/Feature/SharedVideoEditView/SharedVideoEditViewController.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,19 +458,20 @@ extension SharedVideoEditViewController: UICollectionViewDropDelegate {
458458
var updatedItems = currentItems
459459
updatedItems.insert(contentsOf: draggedItems, at: targetIndex)
460460

461+
coordinator.items.forEach { item in
462+
coordinator.drop(item.dragItem, toItemAt: destinationIndexPath)
463+
}
464+
461465
applySnapShot(with: updatedItems)
462466

463-
guard let reorderItem = videoTimelineDataSource.itemIdentifier(for: destinationIndexPath) else { return }
464-
465467
collectionView.scrollToItem(
466468
at: destinationIndexPath,
467469
at: .centeredHorizontally,
468470
animated: true
469471
)
470472

471-
coordinator.items.forEach { item in
472-
coordinator.drop(item.dragItem, toItemAt: destinationIndexPath)
473-
}
473+
guard let reorderItem = videoTimelineDataSource.itemIdentifier(for: destinationIndexPath) else { return }
474+
474475
input.send(.timelineCellOrderDidChanged(to: targetIndex, url: reorderItem.url))
475476
}
476477
}

0 commit comments

Comments
 (0)