编辑swift快速扫描

时间:2017-08-04 16:56:41

标签: ios swift swift3 swipe swipe-gesture

我需要使用滑动功能像书一样滑动,我该如何编辑?因为只有效果是部分卷曲,但是它会向上滑动,但我需要水平,这是代码 - 我需要改变什么?

let leftSwipe = UISwipeGestureRecognizer(target: self, action: #selector(swipeAction(swipe:)))
leftSwipe.direction = UISwipeGestureRecognizerDirection.left
self.view.addGestureRecognizer(leftSwipe)

...

func swipeAction(swipe:UISwipeGestureRecognizer)
{

    performSegue(withIdentifier: "goRight", sender: self)
}

enter image description here

0 个答案:

没有答案