123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- //
- // FUBeautyComponentManager.h
- // FUBeautyComponentManager
- //
- // Created by 项林平 on 2022/6/10.
- //
- #import <UIKit/UIKit.h>
- #import "FUBeautyDefine.h"
- #import "FUBeautySkinView.h"
- #import "FUBeautyShapeView.h"
- #import "FUBeautyFilterView.h"
- #import "FUCommonUIComponent.h"
- #import <FURenderKit/FURenderKit.h>
- NS_ASSUME_NONNULL_BEGIN
- @protocol FUBeautyComponentDelegate <NSObject>
- @optional
- - (void)beautyComponentViewHeightDidChange:(CGFloat)height;
- - (void)beautyComponentDidTouchDownComparison;
- - (void)beautyComponentDidTouchUpComparison;
- /// 提示
- - (void)beautyComponentNeedsDisplayPromptContent:(NSString *)content;
- @end
- @interface FUBeautyComponentManager : NSObject
- @property (nonatomic, strong) FUBeautySkinViewModel *beautySkinViewModel;
- @property (nonatomic, strong) FUBeautyShapeViewModel *beautyShapeViewModel;
- @property (nonatomic, strong) FUBeautyFilterViewModel *beautyFilterViewModel;
- @property (nonatomic, weak) id<FUBeautyComponentDelegate> delegate;
- /// 美颜视图总高度
- @property (nonatomic, assign, readonly) CGFloat componentViewHeight;
- /// 美颜视图选中功能索引,默认-1,-1表示未选中
- @property (nonatomic, assign, readonly) NSInteger selectedIndex;
- + (instancetype)sharedManager;
- /// 销毁
- + (void)destory;
- /// 在目标视图中添加美颜组件视图(固定位置为目标视图底部)
- /// @param view 目标视图
- - (void)addComponentViewToView:(UIView *)view;
- /// 在父视图中移除美颜组件视图
- - (void)removeComponentView;
- /// 加载美颜效果
- - (void)loadBeauty;
- /// 卸载当前加载的美颜
- - (void)unloadBeauty;
- /// 保存当前美颜数据到本地
- - (void)saveBeauty;
- @end
- NS_ASSUME_NONNULL_END
|