Animation fps improvements

This commit is contained in:
Ali 2022-12-25 17:50:32 +04:00
parent 7869790318
commit 812ad9b030
7 changed files with 167 additions and 123 deletions

View file

@ -55,6 +55,7 @@ CABasicAnimation * _Nonnull makeSpringAnimationImpl(NSString * _Nonnull keyPath)
springAnimation.damping = 500.0f;
springAnimation.duration = 0.5;
springAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
return springAnimation;
}

View file

@ -179,7 +179,8 @@ static bool notyfyingShiftState = false;
[RuntimeUtils swizzleInstanceMethodOfClass:[UIWindow class] currentSelector:@selector(initWithFrame:) newSelector:@selector(_65087dc8_initWithFrame:)];
if (@available(iOS 15.0, *)) {
if (@available(iOS 16.0, *)) {
} else if (@available(iOS 15.0, *)) {
[RuntimeUtils swizzleInstanceMethodOfClass:[CADisplayLink class] currentSelector:@selector(setPreferredFrameRateRange:) newSelector:@selector(_65087dc8_setPreferredFrameRateRange:)];
}
});