Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 iOS 开发的新手。我不知道如何在 iPhone 中删除 uipangesture 识别器。如果有人知道请告诉我。
提前致谢。
该类UIView有一个名为 的实例方法-removeGestureRecognizer:,它接受一个UIGestureRecognizer作为参数。因此,例如,如果您有一个UIImageView(imgView变量) 和一个UIPanGestureRecognizer( panRecognizer),您可以:
UIView
-removeGestureRecognizer:
UIGestureRecognizer
UIImageView
imgView
UIPanGestureRecognizer
panRecognizer
[imgView removeGestureRecognizer:panRecognizer];