我有一个 UIPageViewController
里面 ViewController
其中包含 UICollectionView
表示在哪一页,而在 didSelectItemAt
它将子VC设置为显示。
我需要在 UICollectionView
当页面视图被触及时,这样我处理页面选择的方式就不会中断。
我试着在页面上添加一个 UISwipeGestureRecognizer
并使用下面这个方法。
override func willTransition(to newCollection: UITraitCollection, with coordinator: UIViewControllerTransitionCoordinator) {
_delegate?.stopTouches()
}
到目前为止,我还没有找到这样的方法。 有什么建议吗?