hfo*_*sli 13 xcode animation core-animation ios ios-simulator
我想以编程方式检测慢速动画是否在模拟器中打开或关闭.
像这样的东西会很方便.
IPHONE_SIMULATOR_SLOW_ANIMATIONS_ENABLED()
Run Code Online (Sandbox Code Playgroud)
这仅用于开发目的.
幸运的是,这很简单:
float UIAnimationDragCoefficient(void);
static inline BOOL slowAnimationsEnabled()
{
#if TARGET_IPHONE_SIMULATOR
return UIAnimationDragCoefficient() != 1;
#else
return NO;
#endif
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1347 次 |
| 最近记录: |