gpt4 book ai didi

iphone - 如何从左侧加载 View ?

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

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated

此函数从右侧加载 View 。如何从左侧加载 View ?

最佳答案

这里是

CATransition *animation = [CATransition animation];
[[self navigationController] pushViewController:elementController animated:NO];
[animation setDuration:0.45];
[animation setType:kCATransitionPush];
[animation setSubtype:kCATransitionFromLeft];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]];
[[elementController.view layer] addAnimation:animation forKey:@"SwitchToView1"];

为此,您必须#import <QuartzCore/QuartzCore.h>

关于iphone - 如何从左侧加载 View ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13737969/

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