My app requires Pop animation in reverse direction.It's deployment target is IOS 7 only.

So ,I have implemented TRVSNavigationControllerTransition api.

I have default translucent navigation bar. It get popped successfully but flashed black at time of animation.

I have attached image of how actually it is being displayed.

Any help appreciated.

Thanks, Bazinga.enter image description here

有帮助吗?

解决方案

Okay so below is the solution I used to manage the situation .

To Push in reverse (i.e. from Left to Right)

CATransition *transition = [CATransition animation];
        transition.duration = 0.3;
        transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault];
        transition.type = kCATransitionFromLeft;
        [transition setType:kCATransitionPush];
        transition.subtype = kCATransitionFromLeft;
        transition.delegate = self;
        [self.navigationController.view.layer addAnimation:transition forKey:nil];

        self.navigationController.navigationBarHidden = NO;
        [self.navigationController pushViewController:<objVC> animated:NO];

And , To Pop in reverse (i.e. from Right to Left)

CATransition *transition = [CATransition animation];
        transition.duration = 0.3;
        transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault];
        transition.type = kCATransitionFromRight;
        [transition setType:kCATransitionPush];
        transition.subtype = kCATransitionFromRight;
        transition.delegate = self;
        [self.navigationController.view.layer addAnimation:transition forKey:nil];

        self.navigationController.navigationBarHidden = NO;
        [self.navigationController popViewControllerAnimated:NO];
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top