开发者

iOS UIView transition not smooth?

开发者 https://www.devze.com 2023-04-09 11:06 出处:网络
I used the following code to show animation during transition: CATransition *animation = [CATransition animation];

I used the following code to show animation during transition:

CATransition *animation = [CATransition animation];
[animation setDuration:0.4];
[animation set开发者_如何学运维Type:kCATransitionPush];
[animation setSubtype:kCATransitionFromTop];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
[[newPage.view layer] addAnimation:animation forKey:@"SwitchToView1"];

But the transition seems to be not smooth like the other apps I saw. Does anyone know why it's not smooth? Thanks!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号