Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyCollectionView: UICollectionView, UIGestureRecognizerDelegate {
- func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
- return true
- }
- }
- func setupCollection() {
- cellSize = CGSize(width: self.view.frame.width, height: self.view.frame.width)
- collectionView.delegate = self
- collectionView.dataSource = self
- if let layout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout {
- layout.scrollDirection = .horizontal
- }
- //collectionView.isScrollEnabled = false
- collectionView.isPagingEnabled = true
- collectionView.alwaysBounceVertical = false
- }
Add Comment
Please, Sign In to add comment