Custom Flip Segue in Swift
Hier ist mein Code für mein Custom Segue
class FlipFromRightSegue: UIStoryboardSegue {
override func perform() {
let source:UIViewController = self.sourceViewController as UIViewController
let destination:UIViewController = self.destinationViewController as UIViewController
UIView.transitionWithView(source.view, duration: 1.0, options: .CurveEaseInOut | .TransitionFlipFromRight, animations: { () -> Void in
source.view.addSubview(destination.view)
}) { (finished) -> Void in
destination.view.removeFromSuperview()
source.presentViewController(destination, animated: false, completion: nil)
}
}
}
Ich dachte, das funktioniert, aber tatsächlich ändert sich die Ansicht nur, wenn die Überblendung bereits durchgeführt wurde. Was soll ich tun, damit sich die Ansicht ändert, wenn sich der "Flip" in der Mitte befindet?
Danke im Voraus