Skip to content

KingComeFromChina/StarEvaluate

Repository files navigation

StarEvaluate

电商类五星好评实现Demo

效果图

没有评价

五星好评

最少评价至少为1

如果需要的话,请移步我的仓库clone下来后直接把StarEvaluateView拖入工程里就可以使用了

Clone

git clone https://github.com/KingComeFromChina/StarEvaluate.git

Use

首先把StarEvaluateView拖入工程,在你要使用的那个类的controller里导入头文件

#import "StarEvaluateView.h"

调用方法为

// 注意weakSelf
__weak __typeof(self)weakSelf = self;

// 初始化
StarEvaluateView *starEvaluateView = [StarEvaluateView evaluationViewWithChooseStarBlock:^(NSInteger count) {
weakSelf.starCount = count;
NSLog(@"星星数量=====%lu",(unsigned long)_starCount);
}];



starEvaluateView.frame = CGRectMake(0, 0, WLWindowWidth-130, 100);
[self.starView addSubview:starEvaluateView];

// 设置展示的星星数量
// starEvaluateView.starCount = 3;

// 星星之间的间距,默认0.5
// starEvaluateView.space = 0.5;

// 星星的点击事件使能,默认YES
// starEvaluateView.tapEnabled = NO;

已经提供了接口,可以满足你的常规的自定义,如果帮到你了请点击右上角 star或左下角喜欢

About

电商类五星好评实现Demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published