动画,缩放

iOS动画与转场实战
本文详细介绍iOS中UIView动画及CATransition转场动画的应用技巧,包括UIView动画的实现方式、CATransition类动画的具体操作方法,并提供了Swift语言的实际案例。文中还介绍了如何在视图控制器间进行流畅的转场动画。

CGAffineTransformMakeScale & CGAffineTransformScale

IOS CGAffineTransform 用于视图平移,放缩,旋转

爱上你!Quartz 2D 有公式

 

UIViewAnimation动画与CATransition类动画 good

 

func performTransition(vc: UIViewController)

    {

        //preserve the current view snapshot

        UIGraphicsBeginImageContextWithOptions(self.window.bounds.size, true, 0.0);

        self.window.layer.renderInContext(UIGraphicsGetCurrentContext()!);

        let coverImage = UIGraphicsGetImageFromCurrentImageContext();

        //insert snapshot view in front of this one

        let coverView = UIImageView(image: coverImage);

        coverView.frame = self.window.bounds;

//        self.window.addSubview(coverView);

        //update the view (we'll simply randomize the layer background color)

 

        let red = CGFloat(arc4random()) / CGFloat(Int.max);

        let green = CGFloat(arc4random()) / CGFloat(Int.max);

        let blue = CGFloat(arc4random()) / CGFloat(Int.max);

//        self.window.backgroundColor =  UIColor(red: red, green: green, blue: blue, alpha: 1.0);

        //perform animation (anything you like)

        

        self.window.rootViewController = vc;

        var transform = CGAffineTransformMakeScale(0.01, 0.01);

//        transform = CGAffineTransformRotate(transform, CGFloat(M_PI_2));

        vc.view.transform = transform;

        

        UIView.animateWithDuration(0.5, animations: { () -> Void in

            

           

            vc.view.transform = CGAffineTransformIdentity;

            

//            coverView.alpha = 0.0;

 

            

            

            })

            { (Bool) -> Void in

                

//                coverView.removeFromSuperview();

                

                

             };

        

    

    }

Swift  例子教程 航歌 very good  

GLView 例子代码

imple class collection for creating an OpenGL view on iOS and loading and displaying 3D models and images in a variety of formats, including compressed and uncompressed PVRTC.

Swift - GCDWebServer使用详解3(文件传输、WebDav服务器实现)

 

iOS 显式动画 w3cschool very good

CATransition 苹果官方

解析 iOS 动画原理与实现 good

 

iOS开发中ViewController的页面跳转和弹出模态 

 

https://developer.xamarin.com/api/type/CoreImage.CIBarsSwipeTransition/

iOS开发之各种动画各种页面切面效果 good

CIFilter 酷炫动画指南 good

实例讲解iOS中的CATransition转场动画使用

 

Swift-->ViewController跳转,转场以及自定义动画

 iOS动画(Core Animation总结) good 有效果gif

iOS中滤镜的使用(二)滤镜组合 good

动画—Core Animation初步学习五:转场动画_从一个场景以动画的形式过渡到另一个场景

动画类型说明对应常量是否支持方向设置
公开API   
fade淡出效果kCATransitionFade
movein新视图移动到旧视图上kCATransitionMoveIn
push新视图推出旧视图kCATransitionPush
reveal移开旧视图显示新视图kCATransitionReveal
私有API 私有API只能通过字符串访问 
cube立方体翻转效果
oglFlip翻转效果
suckEffect收缩效果
rippleEffect水滴波纹效果
pageCurl向上翻页效果
pageUnCurl向下翻页效果
cameralIrisHollowOpen摄像头打开效果
cameraIrisHollowClose摄像头关闭效果

另外对于支持方向设置的动画类型还包含子类型:

动画子类型说明
kCATransitionFromRight从右侧转场
kCATransitionFromLeft从左侧转场
kCATransitionFromTop从顶部转场
kCATransitionFromBottom从底部转场

 

View Controller Programming Guide for iOS good

iOS CATransition 自定义转场动画 good

iOS自定义转场动画 good

iOS 视图控制器转场详解 iOS7 swift2.2

iOS 视图控制器转场详解 good

[iOS]任性切换自定义转场效果的XXTransition good

 

关于自定义转场动画,我都告诉你

CATransition的动画效果类型及实现方法

iOS开发之Runtime常用示例总结 青玉伏案

iOS开发之各种动画各种页面切面效果

iOS开发之仿射变换示例总结

iOS那些简单的动画(不定期更新)

VCTransitionsLibrary

 

iOS animation动画的三个角色(上) good

 

iOS animation动画三个角色(下)

 

iOS实践:通过核心动画完成过山车  动画系列

iOS中UIView 的旋转与缩放以及同时应用两种效果 good

  

IOS开发UI篇--仿射变换(CGAffineTransform)使用小结 good

 

Core Animation基础介绍、简单使用CALayer以及多种动画效果

【IOS功能实现】之Core Animation动画开发总结(CALayer)

iOS开发UI篇—核心动画简介

Tabbar点击时候超炫小动画

大公司都在研究「微交互」 原来这么重要!

ios缩放动画

用法:(这里用一个button控件来实现)
UIButton *transformButton;
//从小变大:

	[UIView beginAnimations:nil context:nil];
	[UIView setAnimationDuration:0.2];
	[UIView setAnimationDelegate:self];
	transformButton.transform = CGAffineTransformScale([self transformForOrientation], 1.1, 1.1);
	[UIView commitAnimations];

同理
//大变小
transformButton.transform = CGAffineTransformScale([self transformForOrientation], 0.001, 0.001);

 

 

OnQRcodeVCClosed

转载于:https://www.cnblogs.com/dqxu/p/5594355.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值