UIGestureRecognizerDelegate设置响应事件优先级

 

  /*
        #UIGestureRecognizerDelegate
        我在这里设置响应事件的优先级,因为UITap响应事件的优先级会高,则他的subview的事件会被阻止
    */
    func gestureRecognizer(gestureRecognizer: UIGestureRecognizer!, shouldReceiveTouch touch: UITouch!)->Bool{
        if touch.view == gestureRecognizer.view{
            return true
        }
        return false
    }

 

你可能感兴趣的:(iOS)