小编adr*_*uel的帖子

我想快速向右和向左滑动

我在xcode 7(swift)中有一个项目,我想在故事板中加载不同的viewscontrollers设计,使用左右滑动功能,然后转到下一个viewcontroller或返回.现在我有这个,但只是从右到左淡化,我想要两个淡入淡出.

func respondToSwipeGesture(sender: UISwipeGestureRecognizer) {

    switch sender.direction {
    case UISwipeGestureRecognizerDirection.Right:
        print("SWIPED DERECHA")
       self.performSegueWithIdentifier("cambio2", sender: nil)
    case UISwipeGestureRecognizerDirection.Left:
        print("SWIPED IZQUIERDA")
        self.performSegueWithIdentifier("cambio", sender: nil)
    default:
        break
    }
}
Run Code Online (Sandbox Code Playgroud)

storyboard viewcontroller ios swift

3
推荐指数
1
解决办法
5480
查看次数

标签 统计

ios ×1

storyboard ×1

swift ×1

viewcontroller ×1