The UIView#transitionFromView:toView:duration:options:completion:There are only limited animations, but I would like to have an animation that slides left and right like push transition.
ios objective-c
Use the CATransition
class in the Core Animation Framework (Quartz Core Framework).
Core Animation Programming Guide
Transition Animations Support Changes to Layer Visibility
This is what push-like animation looks like.
CATransaction begin;
CATransaction setValue: (id)kCFBooleanTrue
forKey —kCATransactionDisableActions ;
CATransition* transition= CATransition animation;
transition.delegate=self;
transition.duration=.4f;
transition.timingFunction= [CAMediaTimingFunctionFunctionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type =kCATtransitionPush;
transition.subtype=(isRight)?kCATtransitionFromLeft:kCATtransitionFromRight;
targetView.layer addAnimation:transition
forKey:nil];
CATransaction commit ;
582 PHP ssh2_scp_send fails to send files as intended
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.