How to do presentViewController transition from Right to left and dissmissViewController for it reverse?
Asked Answered
Z

0

6

for transition from one viewController to another view i wrote code below like this

    if (UIInterfaceOrientationIsLandscape(STATUSBAR_ORIENTATION)) {

         transition = [CATransition animation];
        transition.duration = 0.3;
        transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
        transition.type = kCATransitionPush;
        transition.subtype = kCATransitionFromBottom;
        [self.view.window.layer addAnimation:transition forKey:nil];

    }
    else
    {
    transition = [CATransition animation];
    transition.duration = 0.3;
    transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
    transition.type = kCATransitionPush;
    transition.subtype = kCATransitionFromLeft;
    [self.view.window.layer addAnimation:transition forKey:nil];
    }

    [self presentViewController:webView animated:NO completion:nil];

It is working fine but when i am rotate in landscape to portrait at the time onwards the view transition from right to left coming how to resolve this...please help me

Zipper answered 30/10, 2014 at 14:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.