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?