Swift版 ScrollView和UITouch事件冲突

OC版地址:http://blog.csdn.net/czxghostyueqiu/article/details/42494337

extension UIScrollView {
    override public func  touchesBegan(touches: Set, withEvent event: UIEvent) {
        self.nextResponder()?.touchesBegan(touches, withEvent: event)
    }
    public override func touchesMoved(touches: Set, withEvent event: UIEvent) {
        self.nextResponder()?.touchesMoved(touches, withEvent: event)
    }
    public override func touchesEnded(touches: Set, withEvent event: UIEvent) {
        self.nextResponder()?.touchesEnded(touches, withEvent: event)

    }
}

你可能感兴趣的:(iOS,swift)