How to call UIViewController's transitionFromViewController in Swift?

Friday, July 4, 2014

How should I implement this method call with Swift?



[containerViewController transitionFromViewController:fromViewController
toViewController:toViewController
duration:0.2
options:UIViewAnimationOptionTransitionCrossDissolve
animations:nil
completion:^(BOOL finished) {
[fromViewController removeFromParentViewController];
[toViewController didMoveToParentViewController:containerViewController];
toViewController.view.frame = containerViewController.view.bounds;
}];


I am at this stage now, but the last 4 argument I do not know how to set.



containerViewController.transitionFromViewController(
fromViewController,
toViewController,
1 as NSTimeInterval,
0 as UIViewAnimationOptions,
nil,
nil)






http://ift.tt/1rsDrTR