【发布时间】:2020-07-15 13:08:07
【问题描述】:
如果我长时间单击图像,然后开始 func actionLongPress,如您所见,如果我长时间单击图像,那么我想沿着我的触摸移动该图像...但是此代码不起作用... 没有错误。即使我长时间单击图像,图像也不会跟随我的触摸.. 你解决这个问题了吗???
@objc func actionLongPress(Recog : UILongPressGestureRecognizer){
if Recog.state == .began{
AudioServicesPlaySystemSound(1519)
addPanGesture(view: addedImage)
origin = addedImage.frame.origin
} else if Recog.state == .ended{
AudioServicesPlaySystemSound(1519)
}
}
【问题讨论】:
标签: ios swift xcode image gesture