Welcome! › Forums › Unity Plugins › In-App Web Browser › Window animate direction › Reply To: Window animate direction
Hi,
Appreciate your prompt reply.
I’d ideally like to get this working on iOS and Android.
I edited iOSInAppBrowser.mm, _PresentInAppBrowserViewController method to a successfully add a left/right transition:
CATransition *transition = [CATransition animation];
transition.duration = .45;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromRight;
[unityAppController.rootViewController.view.window.layer addAnimation:transition forKey:kCATransition];
[unityAppController.rootViewController presentViewController:navigationController animated:false completion:nil];
Following the same process in _CloseInAppBrowser method hasn’t worked for some reason, the window closes with no transition:
CATransition* transition = [CATransition animation];
transition.duration = 2.45;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype= kCATransitionFromLeft;
[unityAppController.rootViewController.view.window.layer addAnimation:transition forKey:kCATransition];
[unityAppController.rootViewController dismissViewControllerAnimated:false completion:nil];
Obviously for Android there’s no source code to tinker with.
Do you think this is feature you’d consider adding?
Many thanks!