I used the code shown below to present a new view controller in a seamless sliding motion. The actual animation works perfectly but when the animation has finished, all of the views disappear and i am left with a blank screen. There is an error posted in the console saying
"Unbalanced calls to begin/end appearance transitions for < Rocket_Game18GameViewController: 0x155e288f0 >"
class SlideRightToLeft: UIStoryboardSegue {
override func perform() {
var sourceVC:UIViewController = self.sourceViewController as UIViewController
var destVC:UIViewController = self.destinationViewController as UIViewController
let sourceVCFrame = sourceVC.view.frame
let width = destVC.view.frame.size.width
sourceVC.view.addSubview(destVC.view)
destVC.view.frame = CGRectOffset(sourceVCFrame, width, 0)
UIView.animateWithDuration(1.5, delay: 0, options: UIViewAnimationOptions.CurveEaseInOut, animations: {
sourceVC.view.frame = CGRectOffset(sourceVCFrame, -width, 0)
}, completion: {
finished in
destVC.view.removeFromSuperview()
sourceVC.presentViewController(destVC, animated: false, completion: nil)
})
}
}
Please ask if you need any more information, Thanks!