1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// GMMarkStarView.h
// ZhengXing
//
// Created by Tulipa on 14-8-21.
// Copyright (c) 2014年 Wanmei Creative. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, GMStarUserType) {
GMStarUserTypeEdit = 0,//可编辑,显示大星星
GMStarUserTypeShow = 1,//纯展示,显示小星星
GMStarUserTypeSmallShow,
GMStarUserTypeTotalComment, //评价信息总评论论星星
GMStarUserTypeCommentDetail //术后效果 服务态度 就医环境
};
typedef NS_ENUM(NSInteger, GMStarColor) {
GMStarColorYellow = 0,
GMStarColorRed = 1,
GMStarColorSmallYellow
};
@interface GMMarkStarView : UIView
/* 可控的星星间距 */
@property (nonatomic, assign) NSInteger space;
@property (nonatomic, assign) GMStarColor starColor;
@property (nonatomic, assign) NSInteger mark;
/* 从5.7开始支持半颗星 */
@property (nonatomic, assign) float number;
@property (nonatomic, assign) BOOL isEnable;
/* 如果用作可以编辑个数的星星,就用大星星,纯展示的就用小星星 */
@property (nonatomic , assign) GMStarUserType type;
@property (nonatomic, copy) void(^markChange)(NSInteger mark);
- (id)initWithUseType:(GMStarUserType)type;
@end
NS_ASSUME_NONNULL_END