UISwipeGestureRecgoniser 中的上下左右多Swift
UISwipeGestureRecgoniser in more than up, down, left and right Swift
对于我的应用程序,我希望拥有它以便用户可以使用 UISwipeGestureRecgoniser 在各个方向滑动。有没有可能不是只有上、下、左、右,而是一个永远的度数,因此我可以用它来朝那个方向移动我的精灵?
UISwipeGestureRecgonizer
没有这种可能,只有4个方向
如果您只想随着用户手指移动对象,您可以尝试拖动事件 (UIControlEventTouchDragInside
)。
这是如何实现这一点的好例子:Basic Drag and Drop in iOS
对于我的应用程序,我希望拥有它以便用户可以使用 UISwipeGestureRecgoniser 在各个方向滑动。有没有可能不是只有上、下、左、右,而是一个永远的度数,因此我可以用它来朝那个方向移动我的精灵?
UISwipeGestureRecgonizer
没有这种可能,只有4个方向
如果您只想随着用户手指移动对象,您可以尝试拖动事件 (UIControlEventTouchDragInside
)。
这是如何实现这一点的好例子:Basic Drag and Drop in iOS