Skip to content

Instantly share code, notes, and snippets.

@soggybag
Created January 7, 2016 06:15
Show Gist options
  • Save soggybag/78246d98c9907c1b6451 to your computer and use it in GitHub Desktop.
Save soggybag/78246d98c9907c1b6451 to your computer and use it in GitHub Desktop.
transitionFromViewController
print("Last Page Said Done")
if let appVC = storyboard?.instantiateViewControllerWithIdentifier("YourAppViewControler") {
let currentVC = pageViewController
appVC.view.frame = currentVC.view.frame
appVC.willMoveToParentViewController(nil)
addChildViewController(appVC)
transitionFromViewController(currentVC, toViewController: appVC, duration: 1.0, options: .TransitionCrossDissolve, animations: { () -> Void in
//
}, completion: { (completed: Bool) -> Void in
currentVC.removeFromParentViewController()
appVC.didMoveToParentViewController(self)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment