35 lines
857 B
Objective-C
35 lines
857 B
Objective-C
//
|
|
// MedalsLevelIndicatorView.h
|
|
// YuMi
|
|
//
|
|
// Created by P on 2025/6/18.
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
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;
|
|
|
|
- (void)setupWithMaxLevel:(NSInteger)maxLevel;
|
|
- (void)setSelectedLevel:(NSInteger)level animated:(BOOL)animated;
|
|
|
|
/**
|
|
* 设置指定等级的图片
|
|
* @param imageUrl 图片URL
|
|
* @param level 等级
|
|
*/
|
|
- (void)setImageUrl:(NSString *)imageUrl forLevel:(NSInteger)level;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|