Files
peko-ios/YuMi/Modules/YMMine/View/Medals/MedalsLevelIndicatorView.h

48 lines
1.2 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// MedalsLevelIndicatorView.h
// YuMi
//
// Created by P on 2025/6/18.
//
#import <UIKit/UIKit.h>
@class MedalSeriesItemVo, MedalVo;
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, MedalsLevelIndicatorType) {
MedalsLevelIndicatorTypeNormal = 0, // 普通类型(只有圆点和文字)
MedalsLevelIndicatorTypeWithImage = 1, // 带图片类型(圆点上方有图片)
};
@interface MedalsLevelIndicatorView : UIView
@property (nonatomic, copy) void (^levelSelectedBlock)(NSInteger level);
@property (nonatomic, assign) MedalsLevelIndicatorType indicatorType;
@property (nonatomic, copy) NSArray <MedalVo *> *seriesItems;
- (void)setupWithMaxLevel:(NSInteger)maxLevel;
- (void)setSelectedLevel:(NSInteger)level animated:(BOOL)animated;
/**
* 重置等级指示器到指定等级
* @param level 等级0表示重置到初始状态
*/
- (void)resetToLevel:(NSInteger)level;
/**
* 设置指定等级的图片
* @param imageUrl 图片URL
* @param level 等级
*/
- (void)setImageUrl:(NSString *)imageUrl forLevel:(NSInteger)level;
/**
* 设置系列数据,用于处理 MP4 和 PNG 资源
* @param seriesItems MedalSeriesItemVo 数组
*/
- (void)setSeriesItems:(NSArray <MedalVo *> *)seriesItems;
@end
NS_ASSUME_NONNULL_END