0

I implemented a slideshow gallery using pop and pushViewController, and would like to improve it by keeping the sliding animation of the view, but removing the sliding animation of the title and buttons in the nav bar. Thus, just setting the animated parameter to NO isn't an option. I did fine the following code:

CATransition *navTransition = [CATransition animation];
navTransition.duration = 0.75;
navTransition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];

navTransition.type = kCATransitionPush;
navTransition.subtype = kCATransitionPush;
[self.navigationController.navigationBar.layer addAnimation:navTransition forKey:nil];

but it adds a slight ease in/ease out, which I would like not to show up.

Any suggestion?

4

1 回答 1

0

这有点复杂,但是您可以制作导航栏的图像,隐藏导航栏,显示您的图像并推送您的视图。完成后,删除图像并取消隐藏导航栏。

有一个 Apple WWDC 视频关于使旋转更平滑,它使用了很多类似的技术,可能会很有启发性。会议 240 - 抛光您的界面旋转(从 2012 年开始)

于 2012-08-08T19:36:52.357 回答