IOS transition animation and iOS transition Animation

Source: Internet
Author: User

IOS transition animation and iOS transition Animation

Animation in iOS: http://my.oschina.net/aofe/blog/270412

The CATransition class is applied to the app to implement the addSubview animation.

-(Void) transitionView_from :( UIView *) one to: (UIView *) two {

CATransition * anim = [CATransition animation];

Anim. delegate = self;

Anim. duration = 0.4f; // animation duration

Anim. type = kCATransitionMoveIn; // animation style

Anim. subtype = kCATransitionFromTop; // animation excessive direction

Anim. startProgress = 0.6; // The animation starts at the 60% progress.

Anim. endProgress = 1; // The animation ends at the 100% progress.

NSInteger index_twoView = [[self. view subviews] indexOfObject: two];

NSInteger index_oneView = [[self. view subviews] indexOfObject: one];

 

[Self. view echangeSubviewAtIndex: index_oneView withSubviewAtIndex: index_twoView]; // The animation enters two and one exits.

[Self. view. layer addSAnimation: anim forKey: @ "animation"]; // starts the animation.

 

}

 

However, I do not like the shadow effect:

But how does UINavigationController achieve the transition effect through CATransition? Is there a way to remove the shadow?

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.