2

试图回到以前的 viewController,但 iOS5 中的动画不起作用。

- (IBAction)backToPreviousController
{
    [self.navigationController popViewControllerAnimated:YES];
}

有人可以帮助我吗?

4

1 回答 1

2

来自OP,戴维琼斯~

手动添加动画解决的问题

CATransition *transition = [CATransition animation]; 
transition.duration = 0.5; 
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]; 
transition.type = kCATransitionPush; 
transition.subtype = kCATransitionFromLeft; 
[self.navigationController.view.layer addAnimation:transition forKey:nil]; 
于 2014-09-04T02:31:49.900 回答