Created
February 25, 2014 03:14
-
-
Save beartung/9201948 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DBPageViewController * pc = [self getPageController:a.toPageId]; | |
pc.refer = pid; | |
[self addChildViewController:pc]; | |
[self.view addSubview:pc.view]; | |
CGFloat width = self.view.frame.size.width; | |
CGFloat height = self.view.frame.size.height; | |
pc.view.frame = CGRectMake(width, 0, width, height); | |
DBPageViewController * pfc = [self getPageController:a.fromPageId]; | |
__weak id weakSelf = self; | |
[self transitionFromViewController:pfc | |
toViewController:pc duration:0.4 | |
options:UIViewAnimationOptionTransitionNone | |
animations:^{ | |
pfc.view.frame = CGRectMake(0 - width, 0, width, height); | |
pc.view.frame = CGRectMake(0, 0, width, height); | |
} | |
completion:^(BOOL finished){ | |
pfc.view.frame = CGRectMake(0, 0, width, height); | |
[pc didMoveToParentViewController:weakSelf]; | |
[self print]; | |
}]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment