我有UIView和UIScrollView。
如何将所有手势从UIView转换为UIScrollView:
在我使用touchesMoved、touchesBegan和touchesEnded方法在UIScrollView上转换点之前,我无法获得类似的效果:
我的问题有解决办法吗?
发布于 2015-09-05 16:07:39
找到解决办法:
weak var receiver: UIView!
override func hitTest(point: CGPoint, withEvent event: UIEvent?) -> UIView? {
if (self.pointInside(point, withEvent: event)) {
return self.receiver;
}
return nil
}touchView.receiver = scrollViewhttps://stackoverflow.com/questions/32413678
复制相似问题