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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
|
And you can call it in both ways:
1
2
|
|
You can go further and expose this to your testers, through iOS Settings Bundle or a fancy shake gesture. Pretty handy!
南来地,北往的,上班的,下岗的,走过路过不要错过!
======================个性签名=====================
之前认为Apple 的iOS 设计的要比 Android 稳定,我错了吗?
下载的许多客户端程序/游戏程序,经常会Crash,是程序写的不好(内存泄漏?刚启动也会吗?)还是iOS本身的不稳定!!!
如果在Android手机中可以简单联接到ddms,就可以查看系统log,很容易看到程序为什么出错,在iPhone中如何得知呢?试试Organizer吧,分析一下Device logs,也许有用.