修复聊天大厅bug

This commit is contained in:
liyuhua
2024-05-11 19:41:16 +08:00
parent f16b7a9bb2
commit 92cb2b6af0
2 changed files with 0 additions and 49 deletions

View File

@@ -1,20 +0,0 @@
//
// CALayer+Animation.h
// YuMi
//
// Created by duoban on 2024/5/6.
//
#import <QuartzCore/QuartzCore.h>
NS_ASSUME_NONNULL_BEGIN
@interface CALayer (Animation)
// 暂停动画
- (void)ms_pauseAnimate;
// 恢复动画
- (void)ms_resumeAnimate;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,29 +0,0 @@
//
// CALayer+Animation.m
// YuMi
//
// Created by duoban on 2024/5/6.
//
#import "CALayer+Animation.h"
@implementation CALayer (Animation)
//
- (void)ms_pauseAnimate {
CFTimeInterval pausedTime = [self convertTime:CACurrentMediaTime() fromLayer:nil];
self.speed = 0.0;
self.timeOffset = pausedTime;
}
//
- (void)ms_resumeAnimate {
CFTimeInterval pausedTime = [self timeOffset];
self.speed = 1.0;
self.timeOffset = 0.0;
self.beginTime = 0.0;
CFTimeInterval timeSincePause = [self convertTime:CACurrentMediaTime() fromLayer:nil] - pausedTime;
self.beginTime = timeSincePause;
}
@end