Toggle Slow Animations
Toggle Slow Animations
iOS Simulator has a feature that slows animations, you can toggle it either by pressing ⌘T or choosing Debug > Toggle Slow Animations in Frontmost App. It’s very useful, but what if we want to do the same on device? It’s easy, fast and simple.
CALayer has a property called speed, which is a time multiplier. This means that if we have an animation with a duration of 1 second, and set the layer’s speed to 2, it’ll take just 0.5 seconds to finish. The best thing about it is that it’s related to the parent layer. So when we change the speed of a particular CALayer, every child layer will be affected. So, if we change UIWindow layer speed, every CALayer in our application will perform animations with that custom speed value. That leaves us with this two extensions:
1 |
|
And you can call it in both ways:
1 |
|
You can go further and expose this to your testers, through iOS Settings Bundle or a fancy shake gesture. Pretty handy!
Toggle Slow Animations的更多相关文章
- iOS.Animations.by.Tutorials.v2.0汉化(四)
第三章 转换 在前面的两章,你学习了如何创建基于视图位置和透明度alpha的动画属性的动画.但是,如果您希望在视图上添加动画或删除动画,您将如何处理呢? 您可以使用前几章的方法来设置进出界面的动画效果 ...
- iOS-调试技巧
目录 前言逼优鸡知己知彼 百战不殆抽刀断Bug 普通操作 全局断点(Global BreakPoint) 条件断点(Condational Breakpoints)打印的艺术 NSLog 开启僵尸对象 ...
- iOS各种调试技巧豪华套餐
转载自http://www.cnblogs.com/daiweilai/p/4421340.html 目录 前言 逼优鸡 知己知彼 百战不殆 抽刀断Bug 普通操作 全局断点(Global Break ...
- xcode的调试技巧
转自:http://www.cnblogs.com/daiweilai/p/4421340.html#biyouji 目录 前言逼优鸡知己知彼 百战不殆抽刀断Bug 普通操作 全局断点(Global ...
- [翻译] POP Facebook的动画开源库
Pop is an extensible animation engine for iOS and OS X. In addition to basic static animations, it s ...
- iOS调试程序的方法
IOS各种调试技巧豪华套餐 普通操作 如图3 基本的断点操作如下 图4 点击那个黑列列就创建了一个断点,再次点击就临时取消这个断点(但是不删除),长按那个断点拖出去就删除了(mac os的系统工程师就 ...
- 使用Xcode进行调试
目录 知己知彼 百战不殆抽刀断Bug 普通操作 全局断点(Global BreakPoint) 条件断点(Condational Breakpoints)打印的艺术 NSLog 开启僵尸对象(Enab ...
- iOS_高效开发之道
iOS_高效开发之道 话不多说, 总结一下个人感觉有利于提高iOS开发效率的几个小技巧. 本文将从下面几方面介绍: Xcode经常使用快捷键 Xcode调试技巧 Objc经常使用代码片段 Xcode插 ...
- iOS 开发常用的调试工具
前言 最近博主临近毕业季,为了完美的写一篇毕业论文,真是:“锄禾日当午,汗滴禾下土”<—— 这句诗跟毕业我写毕业论文没任何一毛钱关系,我就是突然想吟湿了.不过博主作为网络工程专业的好青年,曾经的 ...
随机推荐
- Jenkins的安装配置和使用
Jenkins的安装配置和使用 1 Jenkins介绍 w3cschool中这样介绍:Jenkins是一个独立的开源软件项目,是基于Java开发的一种持续集成工具,用于监控持续重复的工作,旨在提供一个 ...
- 【调试基础】Part 5 PE格式
PE概念.区块分类
- 安装 yaml-cpp,MP4V2
一.在ubuntu上安装yaml-cpp的过程: git clone https://github.com/jbeder/yaml-cpp.git进入yaml-cpp目录后,mkdir buildcd ...
- Photos_2017 China MVP Community Connection
- python中的turtle库(图形绘画库)
turtle绘图的基础知识:1. 画布(canvas) 画布就是turtle为我们展开用于绘图区域,我们可以设置它的大小和初始位置. 设置画布大小 turtle.screensize(canvwidt ...
- 蓝图Blueprint
---恢复内容开始--- 蓝图: flask模块化处理操作和URL的方式 作用: 将不同的功能模块化,实现模块化应用 构建大型应用 优化项目结构 使用步骤 创建蓝图对象 对蓝图对象进行操作(注册路由; ...
- react native第一天--------KnightRider
今天是2017年6月8,是我的项目react native-CRM(用户关系管理)的第一天,一早就配置了一上午Mac的环境,然后运行项目,在react-native init project的时候一直 ...
- Python基础-Python的三元运算符和lambda表达式
1. Python的三元表达式: 现在大部分高级语言都支持 “?”这个三元运算符,它对应的表达式如下:condition ? value if true:value if else 但是 Python ...
- JavaScript 获得客户端IP
Below are all the free active IP lookup services I could find and the information they return. If yo ...
- 2018-2019-2 20175224 实验二《Java面向对象程序设计》实验报告
一.实验报告封面 课程:Java程序设计 班级:1752班 姓名:艾星言 学号:20175224 指导教师:娄嘉鹏 实验日期:2019年4月17日 实验时间:13:45 - 15:25 实验序号:24 ...