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

RameshIos
  • 301
  • 1
  • 4
  • 13

0 Answers0