Skip to content

Instantly share code, notes, and snippets.

@mtrudel
Created July 18, 2011 21:26
Show Gist options
  • Save mtrudel/1090707 to your computer and use it in GitHub Desktop.
Save mtrudel/1090707 to your computer and use it in GitHub Desktop.
--- a/Snares/MHPlanarViewController.m
+++ b/Snares/MHPlanarViewController.m
@@ -55,18 +55,32 @@
[previous viewWillDisappear: YES];
[controller viewWillAppear: YES];
- [UIView transitionWithView: self.view
- duration: 0.6
- options: UIViewAnimationOptionTransitionCurlUp
- animations: ^{
- [previous.view removeFromSuperview];
- [self.view addSubview: newView];
- }
- completion: ^(BOOL finished){
- [previous viewDidDisappear: YES];
- [controller viewDidAppear: YES];
- [previous release];
- }];
+ newView.frame = CGRectMake(320, 0, 320, 480);
+ [self.view addSubview: newView];
+
+ [UIView animateWithDuration: 0.6
+ animations: ^{
+ previous.view.frame = CGRectMake(-320, 0, 320, 480);
+ newView.frame = CGRectMake(0, 0, 320, 480);
+ }
+ completion: ^(BOOL finished){
+ [previous.view removeFromSuperview];
+ [previous viewDidDisappear: YES];
+ [controller viewDidAppear: YES];
+ [previous release];
+ }];
+// [UIView transitionWithView: self.view
+// duration: 0.6
+// options: UIViewAnimationOptionTransitionCurlUp
+// animations: ^{
+// [previous.view removeFromSuperview];
+// [self.view addSubview: newView];
+// }
+// completion: ^(BOOL finished){
+// [previous viewDidDisappear: YES];
+// [controller viewDidAppear: YES];
+// [previous release];
+// }];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment