gpt4 book ai didi

iphone - 更改 UINavigationController 导航栏的动画

转载 作者:行者123 更新时间:2023-12-03 18:52:28 25 4
gpt4 key购买 nike

现在当我使用 [self.navigationController setNavigationBarHidden:NOanimated:YES];

导航栏从右到左飞入,有办法从上到下下拉吗?

最佳答案

尝试一下:

CATransition *transition = [CATransition animation];
transition.duration = kAnimationDuration;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromTop;
transition.delegate = self;
[self.navigationController.view.layer addAnimation:transition forKey:nil];

self.navigationController.navigationBarHidden = NO;
[self.navigationController pushViewController:tableViewController animated:YES];

对我来说效果很好。

来源:http://www.iphonedevsdk.com/forum/iphone-sdk-development/25045-navigation-controller-custom-animation.html

关于iphone - 更改 UINavigationController 导航栏的动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2001466/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com