This commit is contained in:
启星
2025-11-28 22:43:06 +08:00
parent 8913ea6f48
commit 7eb4f8d3b8
197 changed files with 7315 additions and 666 deletions

View File

@@ -0,0 +1,45 @@
//
// QXFloatAnimationHelper.h
// QXLive
//
// Created by 启星 on 2025/11/22.
//
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, FloatAnimationStyle) {
FloatAnimationStyleSmooth, // 平滑漂浮
FloatAnimationStyleBounce, // 弹跳漂浮
FloatAnimationStyleWave, // 波浪漂浮
FloatAnimationStyleBreath // 呼吸式漂浮
};
@interface QXFloatAnimationHelper : NSObject
@property (nonatomic, assign) FloatAnimationStyle style;
@property (nonatomic, assign) CGFloat amplitude; // 浮动幅度
@property (nonatomic, assign) NSTimeInterval duration; // 单次循环时长
@property (nonatomic, assign) BOOL autoStart; // 是否自动开始
// 单例
+ (instancetype)sharedController;
// 为视图添加漂浮动画
- (void)addFloatAnimationToView:(UIView *)view;
- (void)addFloatAnimationToView:(UIView *)view withStyle:(FloatAnimationStyle)style;
// 为多个视图添加漂浮动画(带随机延迟)
- (void)addFloatAnimationToViews:(NSArray<UIView *> *)views;
// 移除漂浮动画
- (void)removeFloatAnimationFromView:(UIView *)view;
- (void)removeAllFloatAnimations;
// 暂停和恢复动画
- (void)pauseFloatAnimationForView:(UIView *)view;
- (void)resumeFloatAnimationForView:(UIView *)view;
@end