谁有ios animationsbyleito by tutorials这本书

iOS Animations by Tutorials (01) - 简书
iOS Animations by Tutorials (01)
Chapter 1: Getting Started with View Animations
Your first animation
打开这章节的starter project 运行,非常简单的一个登录界面,一个标题,两个textfield,一个登录按钮,一张背景图,还有四朵云。
ViewController.swift
初始工程已经把界面元素链接到代码里,而且在viewDidLoad里初始化了一个indicator(小菊花),一个imageView(用来显示登录状态之类的),还有一个label(呈现状态内容)
first task
给标题和两个textField添加动画
首先要做的是把他们移到屏幕外面,在viewWillAppear()添加
heading.center.x -= view.bounds.width
username.center.x -= view.bounds.width
password.center.x -= view.bounds.width
之后添加动画让他们回到之前的位置
在viewDidAppear()中
UIView.animateWithDuration(0.5, animations: {
self.heading.center.x += self.view.bounds.width
一个animateWithDuration方法可以使多个view进行动画 ,但他们是同时发生的,怎么使不同view之间有个先后顺序?delay属性可以对动画触发进行延时,将不同的view写在不同的animateWithDuration方法中,并设置不同的delay值,接着上面的方法添加:
UIView.animateWithDuration(0.5, delay: 0.3, options: [], animations: {
self.username.center.x += self.view.bounds.width
}, completion: nil)`
animateWithDuration: 参数说明:
duration:动画持续时间
delay:延迟动画开始时间
options:(见下方)
animations:在闭包中对view属性进行修改(可修改的view属性见下方),形成动画“动作”
completion:动画结束后的操作
Animatable properties
Position and size
这几个属性可以用来修改view的位置和大小动画
Appearance
颜色和透明度渐变
backgroundColor
Transformation
旋转,拉伸动画等等
Animation options
Repeating:重复循环动画动作(当动作结束的时候会从初始位置重新执行动画动作)
Autoreverse:把动画动作倒回去,和repeating一起使用会从初始位置到结束位置再到初始位置不断循环,like**运动)
UIView.animateWithDuration(0.5, delay: 0.4, options:[.Repeat,.Autoreverse], animations: {
self.password.center.x += self.view.bounds.width
}, completion: nil)
Animation easing
CurveLinear:消除默认的开始加速和结束减速效果
CurveEaseIn:开始阶段加速效果
CurveEaseOut:结束阶段减速的效果
CurveEaseInOut:综合前面两个属性,在开始阶段会有加速,结束阶段会减速(默认属性)
UIView.animateWithDuration(0.5, delay: 0.4, options:[.Repeat,.Autoreverse,.CurveEaseOut], animations: {
self.password.center.x += self.view.bounds.width
}, completion: nil)
Challenges
ViewController有四个outlet:
cloud1,cloud2,cloud3,cloud4,给这四个view添加渐变动画。
1、在viewWillAppear()里设置四朵云alpha属性为0.0.
2、viewDidAppear()里添加animateWithDuration(...)恢复四朵云alpha值为1,delay分别设为0.5,0.7,0.9,1.1
在iOS中随处都可以看到绚丽的动画效果,实现这些动画的过程并不复杂,今天将带大家一窥ios动画全貌。在这里你可以看到iOS中如何使用图层精简非交互式绘图,如何通过核心动画创建基础动画、关键帧动画、动画组、转场动画,如何通过UIView的装饰方法对这些动画操作进行简化等。在今...
在iOS实际开发中常用的动画无非是以下四种:UIView动画,核心动画,帧动画,自定义转场动画。 1.UIView动画 能实现UIView动画的属性 UIView动画是iOS开发中最廉价也是最常用的动画。UIView动画能够设置的动画属性有: frameboundscent...
先看看CAAnimation动画的继承结构 CAAnimation{ CAPropertyAnimation { CABasicAnimation { CASpringAnimation } CAKeyframeAnimation } CATransition CAAnim...
在iOS中随处都可以看到绚丽的动画效果,实现这些动画的过程并不复杂,今天将带大家一窥iOS动画全貌。在这里你可以看到iOS中如何使用图层精简非交互式绘图,如何通过核心动画创建基础动画、关键帧动画、动画组、转场动画,如何通过UIView的装饰方法对这些动画操作进行简化等。在今...
前言 本文只要描述了iOS中的Core Animation(核心动画:隐式动画、显示动画)、贝塞尔曲线、UIView动画的封装。 Core Animation,中文翻译为核心动画,它是一组非常强大的动画处理API,使用它能做出非常炫丽的动画效果,而且往往是事半功倍。也就是说...
每个人都有着自己的想法,独特唯一,若非必要,不要把自己的思想强加在别人的身上,强迫其接受,或许一句“这样会不会更好啊”商量型的询问更好。 很多人,能相遇是一种缘分。但是能不能真正交心是另一回事。以我目前短浅的经历而言,我觉得,真的是物以类聚一一不同的生活环境及经历会导致不同...
是的,很多人就像是我们看到的那样,每天炙肤皸足,在西安的夏天这样说毫不夸张。当你看到这些农民工,传单员,小摊位...每天工作在室外岗位的人们。 你心中总是惦记,惦记着这些人的诚恳,憨厚。他们的脸上没有面具,你所能看到的就是汗水,和岁月留在脸颊的烙印。而很多人总是歧视这些人。...
剑皇是物理输出职业,必须堆物理打击;并且他以气力为主属性,也要堆气力;剑皇比力缺致命一击,有本领的话,也要把致命堆起来。今天手游挂机软件小编为大家带来龙之谷代练剑皇装备推荐。 防具武器: 海龙套装强化+35 剑皇作为输出职业来说,狮蝎套已经无法满意了,优先换海龙套装,强化可...
我们知道… 红光的波长比较长.. 蓝光的波长比较短… 如果把他们画出来的话….. 略萌……. 阳阳只想对这些人说一句话——呵呵....干得漂亮.... 卧槽....三哥有开挂了...真快 吃货必备,切西瓜神器,以后再也不用愁西瓜怎么切了! 现在的熊孩子打起架来无所不用其极啊...
虽时间如梭,可等待总是漫长的。当回忆起来时,一切感觉都变淡了,只觉得时间过得太快了。在不经意间我们经历了这么多,可真的在经历时又觉得还是时间快点到结果是多好呀。 现在正在写这篇文章,又要码字,又要思考。如果只要半小时就可以写完,那么现在时间直接跳到半小时之后那么多好呀,文章...iOS Animations by Tutorials Second Edition Now Available!
Ray is part of a great team - the raywenderlich.com team, a group of over 100 developers and editors from across the world. He and the rest of the team are passionate both about making apps and teaching others the techniques to make them.
When Ray’s not programming, he’s probably playing video games, role playing games, or board games.
Other Items of Interest
raywenderlich.com Weekly
Sign up to receive the latest tutorials from raywenderlich.com each week, and receive a free epic-length tutorial as a bonus!
Advertise with Us!
Video Team... iOS Team... Android Team... Unity Team... Articles Team... Resident Authors Team... Podcast Team... Recruitment Team...&>&iOS Animations by Tutorials, 3rd Edition
iOS Animations by Tutorials, 3rd Edition
上传大小:10.87MB
There’s no denying it: creating animations is one of the most enjoyable parts of iOS development.
Animations are fun to create, they breathe life into your user interface, and they make your app a delight to use.
In this book, you’ll learn about iOS animation
in Swift from beginning to advanced through a series of hands-on tutorials and challenges, that make your app look and feel great.
...展开收缩
综合评分:1(1位用户评分)
下载个数:
{%username%}回复{%com_username%}{%time%}\
/*点击出现回复框*/
$(".respond_btn").on("click", function (e) {
$(this).parents(".rightLi").children(".respond_box").show();
e.stopPropagation();
$(".cancel_res").on("click", function (e) {
$(this).parents(".res_b").siblings(".res_area").val("");
$(this).parents(".respond_box").hide();
e.stopPropagation();
/*删除评论*/
$(".del_comment_c").on("click", function (e) {
var id = $(e.target).attr("id");
$.getJSON('/index.php/comment/do_invalid/' + id,
function (data) {
if (data.succ == 1) {
$(e.target).parents(".conLi").remove();
alert(data.msg);
$(".res_btn").click(function (e) {
var parentWrap = $(this).parents(".respond_box"),
q = parentWrap.find(".form1").serializeArray(),
resStr = $.trim(parentWrap.find(".res_area_r").val());
console.log(q);
//var res_area_r = $.trim($(".res_area_r").val());
if (resStr == '') {
$(".res_text").css({color: "red"});
$.post("/index.php/comment/do_comment_reply/", q,
function (data) {
if (data.succ == 1) {
var $target,
evt = e || window.
$target = $(evt.target || evt.srcElement);
var $dd = $target.parents('dd');
var $wrapReply = $dd.find('.respond_box');
console.log($wrapReply);
//var mess = $(".res_area_r").val();
var mess = resS
var str = str.replace(/{%header%}/g, data.header)
.replace(/{%href%}/g, 'http://' + window.location.host + '/user/' + data.username)
.replace(/{%username%}/g, data.username)
.replace(/{%com_username%}/g, data.com_username)
.replace(/{%time%}/g, data.time)
.replace(/{%id%}/g, data.id)
.replace(/{%mess%}/g, mess);
$dd.after(str);
$(".respond_box").hide();
$(".res_area_r").val("");
$(".res_area").val("");
$wrapReply.hide();
alert(data.msg);
}, "json");
/*删除回复*/
$(".rightLi").on("click", '.del_comment_r', function (e) {
var id = $(e.target).attr("id");
$.getJSON('/index.php/comment/do_comment_del/' + id,
function (data) {
if (data.succ == 1) {
$(e.target).parent().parent().parent().parent().parent().remove();
$(e.target).parents('.res_list').remove()
alert(data.msg);
//填充回复
function KeyP(v) {
var parentWrap = $(v).parents(".respond_box");
parentWrap.find(".res_area_r").val($.trim(parentWrap.find(".res_area").val()));
评论共有1条
假的打不开
wangyunico88
综合评分:
积分/C币:12
综合评分:
积分/C币:4
综合评分:
积分/C币:12
shihan_liu
综合评分:
积分/C币:3
综合评分:
积分/C币:8
综合评分:
积分/C币:10
yinkaisheng-nj
综合评分:
积分/C币:10
综合评分:
积分/C币:5
yinkaisheng-nj
综合评分:
积分/C币:12
VIP会员动态
CSDN下载频道资源及相关规则调整公告V11.10
下载频道用户反馈专区
下载频道积分规则调整V1710.18
spring mvc+mybatis+mysql+maven+bootstrap 整合实现增删查改简单实例.zip
资源所需积分/C币
当前拥有积分
当前拥有C币
输入下载码
为了良好体验,不建议使用迅雷下载
iOS Animations by Tutorials, 3rd Edition
会员到期时间:
剩余下载个数:
剩余积分:
为了良好体验,不建议使用迅雷下载
积分不足!
资源所需积分/C币
当前拥有积分
您可以选择
程序员的必选
绿色安全资源
资源所需积分/C币
当前拥有积分
当前拥有C币
(仅够下载10个资源)
为了良好体验,不建议使用迅雷下载
资源所需积分/C币
当前拥有积分
当前拥有C币
为了良好体验,不建议使用迅雷下载
资源所需积分/C币
当前拥有积分
当前拥有C币
您的积分不足,将扣除 10 C币
为了良好体验,不建议使用迅雷下载
你当前的下载分为234。
你还不是VIP会员
开通VIP会员权限,免积分下载
你下载资源过于频繁,请输入验证码
您因违反CSDN下载频道规则而被锁定帐户,如有疑问,请联络:!
若举报审核通过,可奖励5下载分
被举报人:
shihan_liu
举报的资源分:
请选择类型
资源无法下载
资源无法使用
标题与实际内容不符
含有危害国家安全内容
含有反动色情等内容
含广告内容
版权问题,侵犯个人或公司的版权
*详细原因:
iOS Animations by Tutorials, 3rd Edition&>&iOS.Animations.by.Tutorials.3rd.Edition.code.zip
iOS.Animations.by.Tutorials.3rd.Edition.code.zip
上传大小:48.1MB
iOS.Animations.by.Tutorials.3rd.Edition随书代码
综合评分:5(3位用户评分)
下载个数:
{%username%}回复{%com_username%}{%time%}\
/*点击出现回复框*/
$(".respond_btn").on("click", function (e) {
$(this).parents(".rightLi").children(".respond_box").show();
e.stopPropagation();
$(".cancel_res").on("click", function (e) {
$(this).parents(".res_b").siblings(".res_area").val("");
$(this).parents(".respond_box").hide();
e.stopPropagation();
/*删除评论*/
$(".del_comment_c").on("click", function (e) {
var id = $(e.target).attr("id");
$.getJSON('/index.php/comment/do_invalid/' + id,
function (data) {
if (data.succ == 1) {
$(e.target).parents(".conLi").remove();
alert(data.msg);
$(".res_btn").click(function (e) {
var parentWrap = $(this).parents(".respond_box"),
q = parentWrap.find(".form1").serializeArray(),
resStr = $.trim(parentWrap.find(".res_area_r").val());
console.log(q);
//var res_area_r = $.trim($(".res_area_r").val());
if (resStr == '') {
$(".res_text").css({color: "red"});
$.post("/index.php/comment/do_comment_reply/", q,
function (data) {
if (data.succ == 1) {
var $target,
evt = e || window.
$target = $(evt.target || evt.srcElement);
var $dd = $target.parents('dd');
var $wrapReply = $dd.find('.respond_box');
console.log($wrapReply);
//var mess = $(".res_area_r").val();
var mess = resS
var str = str.replace(/{%header%}/g, data.header)
.replace(/{%href%}/g, 'http://' + window.location.host + '/user/' + data.username)
.replace(/{%username%}/g, data.username)
.replace(/{%com_username%}/g, data.com_username)
.replace(/{%time%}/g, data.time)
.replace(/{%id%}/g, data.id)
.replace(/{%mess%}/g, mess);
$dd.after(str);
$(".respond_box").hide();
$(".res_area_r").val("");
$(".res_area").val("");
$wrapReply.hide();
alert(data.msg);
}, "json");
/*删除回复*/
$(".rightLi").on("click", '.del_comment_r', function (e) {
var id = $(e.target).attr("id");
$.getJSON('/index.php/comment/do_comment_del/' + id,
function (data) {
if (data.succ == 1) {
$(e.target).parent().parent().parent().parent().parent().remove();
$(e.target).parents('.res_list').remove()
alert(data.msg);
//填充回复
function KeyP(v) {
var parentWrap = $(v).parents(".respond_box");
parentWrap.find(".res_area_r").val($.trim(parentWrap.find(".res_area").val()));
评论共有3条
可惜没有最新的哦
谢谢分享资源
资源很好啊
综合评分:
积分/C币:8
shihan_liu
综合评分:
积分/C币:3
综合评分:
积分/C币:10
综合评分:
积分/C币:5
yinkaisheng-nj
综合评分:
积分/C币:10
yinkaisheng-nj
综合评分:
积分/C币:5
CSDNUser2017
综合评分:
积分/C币:3
yinkaisheng-nj
综合评分:
积分/C币:12
CSDNUser2017
综合评分:
积分/C币:3
无法显示昵称
综合评分:
积分/C币:12
积分&58595
VIP会员动态
CSDN下载频道资源及相关规则调整公告V11.10
下载频道用户反馈专区
下载频道积分规则调整V1710.18
spring mvc+mybatis+mysql+maven+bootstrap 整合实现增删查改简单实例.zip
资源所需积分/C币
当前拥有积分
当前拥有C币
输入下载码
为了良好体验,不建议使用迅雷下载
iOS.Animations.by.Tutorials.3rd.Edition.code.zip
会员到期时间:
剩余下载个数:
剩余积分:
为了良好体验,不建议使用迅雷下载
积分不足!
资源所需积分/C币
当前拥有积分
您可以选择
程序员的必选
绿色安全资源
资源所需积分/C币
当前拥有积分
当前拥有C币
(仅够下载10个资源)
为了良好体验,不建议使用迅雷下载
资源所需积分/C币
当前拥有积分
当前拥有C币
为了良好体验,不建议使用迅雷下载
资源所需积分/C币
当前拥有积分
当前拥有C币
您的积分不足,将扣除 10 C币
为了良好体验,不建议使用迅雷下载
你当前的下载分为234。
你还不是VIP会员
开通VIP会员权限,免积分下载
你下载资源过于频繁,请输入验证码
您因违反CSDN下载频道规则而被锁定帐户,如有疑问,请联络:!
若举报审核通过,可奖励5下载分
被举报人:
xinconan1992
举报的资源分:
请选择类型
资源无法下载
资源无法使用
标题与实际内容不符
含有危害国家安全内容
含有反动色情等内容
含广告内容
版权问题,侵犯个人或公司的版权
*详细原因:
iOS.Animations.by.Tutorials.3rd.Edition.code.zip}

我要回帖

更多关于 ios beginanimations 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信