Skip to content

Commit 3732181

Browse files
committed
Fix the issue of double tap on cell
1 parent 5790214 commit 3732181

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ Drag files in "Classes" folder into your project.
2323
![set the delegate](https://raw.githubusercontent.com/seedante/SDECollectionViewAlbumTransition/PinchPopTransition/Config2.png)
2424

2525

26-
- At the last, add one line code in your UICollectionView's delegate:
27-
- 最后要做的一件事是,在下面的方法中添加一行代码
26+
- At the last, add the follow codes in your UICollectionView's delegate:
27+
- 最后要做的一件事是,在下面的方法中添加几行行代码
2828

2929
override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
3030
self.selectedIndexPath = indexPath
31+
self.collectionView?.allowsSelection = false //disable interaction to prevent the issue of double tap on cell
3132
...
33+
self.navigationController?.pushViewController(toVC, animated: true)
34+
self.collectionView?.allowsSelection = true //enable again after push.
3235
}
3336
3437
**Now the collectionView supports to pinch to pop.**

0 commit comments

Comments
 (0)