Animating the transition from a web view to an Objective-C page
To implement a transition animation when switching the display from the web view to the native page, follow these instructions.
Implement the methods: onBeforeShow and onAfterShow. These methods are called before the display switches from the web view to the native page, and after the transition.
-(void)onBeforeShow{ CDVAppDelegate *cordovaAppDelegate = (CDVAppDelegate *)[[UIApplication sharedApplication] delegate]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.5]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:[cordovaAppDelegate window] cache:YES]; } -(void)onAfterShow{ [UIView commitAnimations]; }
Parent topic: Web and native code in iPhone, iPad, and Android