IOS第18天(8,核心动画转场动画)】的更多相关文章

转自:http://www.cnblogs.com/wendingding/p/3801454.html iOS开发UI篇—核心动画(转场动画和组动画) 一.转场动画简单介绍 CAAnimation的子类,用于做转场动画,能够为层提供移出屏幕和移入屏幕的动画效果.iOS比Mac OS X的转场动画效果少一点 UINavigationController就是通过CATransition实现了将控制器的视图推入屏幕的动画效果 属性解析: type:动画过渡类型 subtype:动画过渡方向 star…
UIView封装动画--iOS利用系统提供方法来做转场动画 UIViewAnimationOptions option; if (isNext) { option=UIViewAnimationOptionCurveLinear|UIViewAnimationOptionTransitionFlipFromRight; }else{ option=UIViewAnimationOptionCurveLinear|UIViewAnimationOptionTransitionFlipFromLef…
使用UIView动画函数实现转场动画——双视图 + (void)transitionFromView:(UIView *)fromView toView:(UIView *)toView duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options completion:(void (^)(BOOL finished))completion;   参数说明: –duration:动画的持续时间 –options…
使用UIView动画函数实现转场动画——单视图 + (void)transitionWithView:(UIView *)view duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion;   参数说明: –duration:动画的持续时…
目标:实现通过手势进行图片的切换   通过左扫右扫 来实现(纯代码) 添加三个属性 1uiImageView 用来显示图片的view 2 index 用来表示图片的索引 3 ISLeft 判断是不是向左滑 下边是详细的代码: - (void)viewDidLoad { [super viewDidLoad]; self.index = 0; self.ISLeft = YES; _imageView = [[UIImageView alloc]initWithFrame:self.view.fr…
****动画组 // 核心动画都是假象,不能改变layer的真实属性的值// 展示的位置和实际的位置不同.实际位置永远在最开始位置 #import "HMViewController.h" @interface HMViewController () @property (weak, nonatomic) IBOutlet UIView *redView; @end @implementation HMViewController - (void)viewDidLoad { [supe…
****动画效果 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [UIView animateWithDuration: animations:^{ // 旋转 // _imageView.layer.transform = CATransform3DMakeRotation(M_PI, 1, 1, 0); // 平移 // _imageView.layer.transform = CATransform3D…
*****HMViewController.m #import "HMViewController.h" #import "HMWheelView.h" @interface HMViewController () @property (nonatomic, weak) HMWheelView *wheelView; @end @implementation HMViewController - (IBAction)start:(id)sender { [_whee…
***翻页效果 #import "HMViewController.h" @interface HMViewController () @property (weak, nonatomic) IBOutlet UIImageView *imageView; @property (nonatomic, assign) int index; @end @implementation HMViewController - (void)viewDidLoad { [super viewDidL…
**** #import "HMViewController.h" // 每秒秒针转6度 #define perSecendA 6 // 每分钟分针转6度 #define perMinuteA 6 // 每小时时针转6度 #define perHourA 30 // 每分钟时针转6度 #define perMinuteHourA 0.5 #define angle2radian(x) ((x) / 180.0 * M_PI) @interface HMViewController ()…