测试测试过 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最新发布 | 2017年6月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 DuckDeck 维护。
===
##StarReview是一个iOS评分工具。它使用常见的星星来为某些事物进行评分【StarReview是一个iOS评分工具,用星星来为某些东西进行评分】
StarReview是一个强大的iOS UI工具。它是一个UIControl的子类,它创建了一个包含评分星星的可定制的视图。【StarReview是一个强大的iOS UI工具,它继承了UIControl,并提供了包含可评分星星的View。## 主要特点
## 系统需求
Xcode 7.1 和 iOS 8.0(最新的Swift语法)【Xcode 7.1 和 iOS 8.0(最新的Swift语法)】## 安装
## 如何使用请参考以下代码
let star = StarReview(frame: CGRect(x: 15, y: 100, width: 200, height: 50)) //init the StarReview
star.starMarginScale = 0.3 //set the gap/star diameter scale the default value is 0.3
star.value = 2 //set the StarReview init value
star.starCount = 5 // set the StarReview star count, the default value = 5
star.allowEdit = true // set the user can rate the defalut value is true
star.allowAccruteStars = true //set whether use float or int to present star value
star.starFillColor = UIColor.orangeColor() //the star fill color
star.starBackgroundColor = UIColor.lightGrayColor() //the star background color
star.addTarget(self, action: "valueChange:", forControlEvents: UIControlEvents.ValueChanged) // add the star value change event
view.addSubview(star) //add the StarReview
参考Demo项目的代码将有助于您更好地理解【参考Demo项目的代码将有助于您更好地理解】