の中に がありUICollectionView、UIViewControllerの内側と外側のジェスチャに応答するようにしUICollectionViewます。デフォルトでは、UICollectionViewはそれ自体の内側のジェスチャにのみ応答しますviewが、その外側のスワイプに応答させるにはどうすればよいviewですか?
ありがとう。
の中に がありUICollectionView、UIViewControllerの内側と外側のジェスチャに応答するようにしUICollectionViewます。デフォルトでは、UICollectionViewはそれ自体の内側のジェスチャにのみ応答しますviewが、その外側のスワイプに応答させるにはどうすればよいviewですか?
ありがとう。
ネイラーの答えの迅速なバージョン、これはビューコントローラーで行われたすべてのジェスチャーをコレクションビューに転送します
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
collectionView.touchesBegan(touches, withEvent: event)
}
override func touchesEnded(touches: Set<UITouch>, withEvent event: UIEvent?) {
collectionView.touchesEnded(touches, withEvent: event)
}
override func touchesCancelled(touches: Set<UITouch>?, withEvent event: UIEvent?) {
collectionView.touchesCancelled(touches, withEvent: event)
}
override func touchesMoved(touches: Set<UITouch>, withEvent event: UIEvent?) {
collectionView.touchesMoved(touches, withEvent: event)
}