ra1028 / RAReorderableLayout

A UICollectionView layout whitch can move item with drag and drop.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Haptic feedback for 3D touch enabled devices

stasix opened this issue · comments

It there an option to add 3D touch feedback on drag and drop?

Yes, but you will have to override the RAReorderableLayoutDelegate methods and add the Haptic feedback yourself.

You could use any of these to hook in and perform the haptic feedback where it feels best to you:

    func collectionView(_ collectionView: UICollectionView, at: IndexPath, willMoveTo toIndexPath: IndexPath)
    func collectionView(_ collectionView: UICollectionView, at: IndexPath, didMoveTo toIndexPath: IndexPath)
    
    func collectionView(_ collectionView: UICollectionView, collectionView layout: RAReorderableLayout, willBeginDraggingItemAt indexPath: IndexPath)
    func collectionView(_ collectionView: UICollectionView, collectionView layout: RAReorderableLayout, didBeginDraggingItemAt indexPath: IndexPath)
    func collectionView(_ collectionView: UICollectionView, collectionView layout: RAReorderableLayout, willEndDraggingItemTo indexPath: IndexPath)
    func collectionView(_ collectionView: UICollectionView, collectionView layout: RAReorderableLayout, didEndDraggingItemTo indexPath: IndexPath)