TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Jun 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by DuckDeck.
===
##StarReview is a iOS Rate tool. it use common star to rate something【StarReview是一个IOS打分工具,用星星来给某些东西打分】
StarReview is a powerful iOS UI tool. It is a UIControl subclass that creates a customizable rating view containing rating stars in it. 【StarReview是一个强大的IOS UI 工具他继承了UIControl 并提供了可定制的包含可打分星星的VIew.】 ##Key Features
##Requirements 【系统需要】
Xcode 7.1 and iOS 8.0(the lasted swift grammar) 【Xcode 7.1 and iOS 8.0(最新的Swift语法)】 ##Installation 【安装】
##How To Use It 【怎么使用】 Please see these code below请参考下面的代码
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
Check the demo project will help you understand more 参考Demo项目的代码会更好理解
##Contact Any issue or problem please contact me:[email protected], I will be happy fix it 任何问题或者BUG请直接和我联系[email protected], 我会乐于帮你解决