Provide to the outside add other gestures, such as the scroll view in the head.to solve the problem that the head can be dragged horizontally and vertically at the same time.
use like this:
class HomeViewController: SegementSlideDefaultViewController {
var customHeaderView: HomeHeaderView?
override func viewDidLoad() {
self.customHeaderView = HomeHeaderView.headerView()
super.viewDidLoad()
//mainView is a UICollectionView
if let gestureRecognizersInScrollView = customHeaderView?.cycleView.mainView.gestureRecognizers {
addGesture(getsture: gestureRecognizersInScrollView)
}
}
}
class HomeHeaderView: UIView {
let cycleView = SDCycleScrollView()
}
Provide to the outside add other gestures, such as the scroll view in the head.to solve the problem that the head can be dragged horizontally and vertically at the same time.
use like this: