12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // XYPlayPAGView.h
- // Timi
- //
- // Created by 翟玉磊 on 2021/12/28.
- //
- #import <UIKit/UIKit.h>
- #include <libpag/PAGView.h>
- NS_ASSUME_NONNULL_BEGIN
- typedef enum : NSUInteger {
- // 送礼昵称 打赏
- XYPlayPAGReplaceTextContentTypeComboTitle = 1,
- // 收礼昵称 礼物名称 x20
- XYPlayPAGReplaceTextContentTypeComboSubtitle = 0,
- } XYPlayPAGReplaceTextContentType;
- typedef enum : NSUInteger {
- // 礼物图标
- XYPlayPAGReplaceImageContentTypeComboGiftIcon = 1,
- // 礼物连击发送者头像/首页导航守护发送者头像
- XYPlayPAGReplaceImageContentTypeComboSenderIcon = 3,
- // 礼物连击接受者头像/首页导航守护接受者头像
- XYPlayPAGReplaceImageContentTypeComboReceiverIcon = 2,
- } XYPlayPAGReplaceImageContentType;
- @interface XYPlayPAGView : UIView
- /// 设置动画资源路径且是否播放
- /// @param fileName 资源文件
- /// @param play 是否播放
- - (void)setResourcePathWithFileName:(NSString *)fileName play:(BOOL)play;
- /// 设置动画资源路径
- - (void)setResourcePathWithFileName:(NSString *)fileName;
- /// 设置播放次数 -1则无限播放 默认-1
- - (void)setRepeatCount:(int)repeatCount;
- /// 动画视图显示方式 拉伸,平铺、、
- - (void)setScaleMode:(PAGScaleMode)value;
- /// 替换文本
- - (void)replaceText:(XYPlayPAGReplaceTextContentType)type text:(NSString *)text;
- /// 替换图片
- - (void)replaceImage:(XYPlayPAGReplaceImageContentType)type image:(UIImage *)image;
- /// 当前播放状态
- - (BOOL)isPlaying;
- /// 播放
- - (void)play;
- /// 暂停
- - (void)stop;
- /// 注销
- - (void)clear;
- @end
- NS_ASSUME_NONNULL_END
|