更新 MedalsCollectionViewCell 和 MedalsDetailView 以支持带图片的等级指示器,新增 MedalsLevelIndicatorType 枚举以区分指示器类型,优化手势识别功能,确保用户体验流畅,保持代码结构一致性。
This commit is contained in:
@@ -9,13 +9,26 @@
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user