RAReorderableLayout icon indicating copy to clipboard operation
RAReorderableLayout copied to clipboard

Haptic feedback for 3D touch enabled devices

Open stasix opened this issue 8 years ago • 1 comments

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

stasix avatar Feb 14 '17 07:02 stasix

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)

ThuggishNuggets avatar Aug 28 '17 20:08 ThuggishNuggets