Closed mapedd closed 11 years ago
Yes it's possible, but that's not the purpose of this component.
However if you want to do it, you can do it this way:
Put this in the header file (and remove it from the implementation file):
@interface GC3DFlipTransitionStyleViewController : GLKViewController
@property (strong, nonatomic) UIView *sourceView;
@property (strong, nonatomic) UIView *destinationView;
@property (assign, nonatomic) float depth;
@property (assign, nonatomic) BOOL disableLightEffect;
@property (assign, nonatomic) BOOL disableMultisampling;
@end
Then call this code manually in your own view controller:
GC3DFlipTransitionStyleViewController *flipViewController = [[GC3DFlipTransitionStyleViewController alloc] init];
flipViewController.sourceView = self.view;
flipViewController.destinationView = <#your destination view controller#>;
[self presentViewController:<#your destination view controller#> animated:NO completion:nil];
[<#your destination view controller#> presentViewController:flipViewController animated:NO completion:nil];
awesome! But how can i return to source view controller? Present it identical manner or dismiss it somehow?
Yes, you should dismiss the current view controller you are showing.
So it probably would look like this (I have not tested it though):
GC3DFlipTransitionStyleViewController *flipViewController = [[GC3DFlipTransitionStyleViewController alloc] init];
flipViewController.sourceView = self.view;
flipViewController.destinationView = <#your destination view controller#>;
[self dismissViewControllerAnimated:NO completion:nil];
[<#your destination view controller#> presentViewController:flipViewController animated:NO completion:nil];
Is it possible to use this Transition without Storyborads?