我有一个带滑动手势的UIView.
let swipeUpGesture = UISwipeGestureRecognizer(target: self, action: #selector(NextStepCaptureVC.handleSwipeUp(gesture:)))
swipeUpGesture.direction = .up
view.addGestureRecognizer(swipeUpGesture)
func handleSwipeUp(gesture: UISwipeGestureRecognizer) {
print("Swipe Up")
heightSlider.setValue(20, animated: true)
}
Run Code Online (Sandbox Code Playgroud)
当我尝试更改它的值时,但值从0跳到20.我希望值在刷卡时连续变化.我该怎么做?