Files
peko-ios/YuMi/Modules/YMMine/View/Medals/MedalsLevelIndicatorView.h
edwinQQQ 99db078b62 feat(勋章): 新增多等级高亮功能并优化勋章展示逻辑
refactor(勋章排行): 重构排行榜分页加载和刷新逻辑

fix(会话): 优化官方账号判断逻辑和跳转处理

style(UI): 调整勋章排行榜和游戏菜单UI布局

chore: 更新Podfile配置和bitcode框架列表
2025-07-03 19:35:17 +08:00

55 lines
1.4 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 levels 需要高亮的等级数组
* @param animated 是否使用动画
*/
- (void)setHighlightLevels:(NSArray<NSNumber *> *)levels 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