ios - 在 View Controller 之间转换时自定义动画
<p><p>我想像这样在 ViewController 之间创建过渡。
<a href="https://www.dropbox.com/s/qatwqaq2mowocsg/Transitions%20Controller.gif?dl=0" rel="noreferrer noopener nofollow">https://www.dropbox.com/s/qatwqaq2mowocsg/Transitions%20Controller.gif?dl=0</a> </p>
<p>我已使用以下代码创建过渡,但无法实现以下结果。 </p>
<pre><code>self.settings = ;
CATransition* transition = ;
transition.duration = 0.4;
transition.type = kCATransitionPush;
transition.timingFunction = ;
transition.subtype=kCATransitionFromRight;
[.view.layer addAnimation:transition forKey:kCATransition];
[ pushViewController:self.settings animated:NO];
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>你可以试试这个代码:</p>
<pre><code>self.settings = ;
;
;
;
[UIView setAnimationTransition:
UIViewAnimationTransitionFlipFromRight
forView:self.navigationController.view cache:NO];
;
;
</code></pre></p>
<p style="font-size: 20px;">关于ios - 在 ViewController 之间转换时自定义动画,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/32710102/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/32710102/
</a>
</p>
页:
[1]