【发布时间】:2015-12-27 15:05:48
【问题描述】:
我在 xcode 7 ( swift ) 中有一个项目,我想加载在故事板中设计的不同视图控制器,其功能是左右滑动并转到下一个视图控制器或返回。 现在我有了这个,但只从右到左淡入,我想要两个淡入。
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
}
}
【问题讨论】:
标签: ios swift storyboard viewcontroller