IOS jumps between controllers to achieve transition animations

Source: Internet
Author: User
<span id="Label3"></p><p><p>Have mastered the Calayer under the Catransition animation under the same controller, but how to jump between different controllers to achieve it?</p></p><p><p>  </p></p><pre class="brush:objc;gutter:true;"><pre class="brush:objc;gutter:true;">Myviewcontroller *MYVC = [[myviewcontroller alloc]init]; Create animation catransition *animation = [catransition animation]; Set the speed of the motion trajectory animation.timingfunction = uiviewanimationcurveeaseinout; Set animation type to cube animation Animation.type = @ "cube"; Set the animation length animation.duration =0.5f; Set the direction of movement Animation.subtype =kcatransitionfromright; The controller jumps between the pictures <span style="background-color: #888888;">[[uiapplication sharedapplication].keywindow.layer addanimation:animation forkey:nil];</span> [self PRESENTVIEWCONTROLLER:MYVC Animated:no completion:nil];<br></pre></pre><p><p>Some common animation types are attached below:</p></p><code class="js plain"><code class="js plain">  Fade = 1,                   </code></code><code class="js comments"><code class="js comments">//淡入淡出</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">Push,                       </code></code><code class="js comments"><code class="js comments">//推挤</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">Reveal,                     </code></code><code class="js comments"><code class="js comments">//揭开</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">MoveIn,                     </code></code><code class="js comments"><code class="js comments">//覆盖</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">Cube,                       </code></code><code class="js comments"><code class="js comments">//立方体</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">SuckEffect,                 </code></code><code class="js comments"><code class="js comments">//吮吸</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">OglFlip,                    </code></code><code class="js comments"><code class="js comments">//翻转</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">RippleEffect,               </code></code><code class="js comments"><code class="js comments">//波纹</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">PageCurl,                   </code></code><code class="js comments"><code class="js comments">//翻页</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">PageUnCurl,                 </code></code><code class="js comments"><code class="js comments">//反翻页</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">CameraIrisHollowOpen,       </code></code><code class="js comments"><code class="js comments">//开镜头</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">CameraIrisHollowClose,      </code></code><code class="js comments"><code class="js comments">//关镜头</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">CurlDown,                   </code></code><code class="js comments"><code class="js comments">//下翻页</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">CurlUp,                     </code></code><code class="js comments"><code class="js comments">//上翻页</code></code><code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">FlipFromLeft,               </code></code><code class="js comments"><code class="js comments">//左翻转</code></code>Attach the book of the Great God: http://www.jianshu.com/p/09b7e5ff371c<code class="js spaces"><code class="js spaces">    </code></code><code class="js plain"><code class="js plain">FlipFromRight,              </code></code><code class="js comments"><code class="js comments">//右翻转</code></code><p><p>IOS jumps between controllers to achieve transition animations</p></p></span>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.