All Projects → yinjining → StarRateView

yinjining / StarRateView

Licence: other
swift五星评分,星星评分控件,支持自定义数量、拖拽、0.1颗星等多种操作

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to StarRateView

DoubleStar
A personalized/enhanced re-creation of the Darkhotel "Double Star" APT exploit chain with a focus on Windows 8.1 and mixed with some of my own techniques
Stars: ✭ 140 (+536.36%)
Mutual labels:  star
nativescript-star-printer
🌟 Print directly to Star Micronics printers from your NativeScript app! http://www.starmicronics.com/
Stars: ✭ 28 (+27.27%)
Mutual labels:  star
Quizoo
Online Quiz Platform for conducting quizes
Stars: ✭ 27 (+22.73%)
Mutual labels:  star
Hacktoberfest 2021
This repository aims to help code beginners with their first successful pull request and open source contribution. Happy coding!
Stars: ✭ 109 (+395.45%)
Mutual labels:  star
pathoscore
pathoscore evaluates variant pathogenicity tools and scores.
Stars: ✭ 21 (-4.55%)
Mutual labels:  score
tomato
Turkish-Ottoman Makam (M)usic Analysis TOolbox
Stars: ✭ 30 (+36.36%)
Mutual labels:  score
arriba
Fast and accurate gene fusion detection from RNA-Seq data
Stars: ✭ 162 (+636.36%)
Mutual labels:  star
ionic2-firebase-hackathon-starter
A hackathon starter for ionic2 using firebase, already has user authentication, reset password, google login etc
Stars: ✭ 34 (+54.55%)
Mutual labels:  star
stars
⭐ Keep your Github Stars fresh!
Stars: ✭ 95 (+331.82%)
Mutual labels:  star
git-cheatsheet
One stop guide to help solve all your doubts related to Git & GitHub.
Stars: ✭ 31 (+40.91%)
Mutual labels:  star
Star-lang-specification
Work in progress specs for the Star programming language
Stars: ✭ 26 (+18.18%)
Mutual labels:  star
python-blobopera
Toolkit to convert MusicXML files into Blob Opera scores with real lyrics.
Stars: ✭ 24 (+9.09%)
Mutual labels:  score
wildmatch
Simple string matching with questionmark- and star-wildcard operator
Stars: ✭ 37 (+68.18%)
Mutual labels:  star
New-Star
Web. browser game engine :)
Stars: ✭ 64 (+190.91%)
Mutual labels:  star
SymbTr
Turkish Makam Music Symbolic Data Collection
Stars: ✭ 55 (+150%)
Mutual labels:  score
vstar
⭐ A simple web app to count a GitHub user's total stars
Stars: ✭ 22 (+0%)
Mutual labels:  star
Hacktoberfest-2021
Make this Hacktoberfest a learning period and contribute to Great Open Source Projects.
Stars: ✭ 523 (+2277.27%)
Mutual labels:  star
Bitcoin-wallet-cracker
Automated Bitcoin wallet generator that with mnemonic and passphrases bruteforces wallet addresses
Stars: ✭ 140 (+536.36%)
Mutual labels:  star
cargo-esr
Extended Search & Ranking tool for crates.
Stars: ✭ 23 (+4.55%)
Mutual labels:  score
JHLikeButton
❤️点赞动画,点赞星星,点赞爱心,抖音点赞 ❤️
Stars: ✭ 41 (+86.36%)
Mutual labels:  star

JNStarRateView是封装好的一个星星评分控件

项目中用到好多星星评分,整理了一下给大家分享下 WechatIMG6.jpeg

我封装了一个类,以适应星星评分的各种情况。下面直接上代码

1、调用类使用

1.1 创建

//        let starView = JNStarRateView.init(frame: CGRect(x: 20,y: 60,width: 200,height: 38))//默认的是5颗星,分数为0分
let starView = JNStarRateView.init(frame: CGRect(x: 20,y: 60,width: 200,height: 38), numberOfStars: 5, currentStarCount: 3.4)
self.view.addSubview(starView)

1.2关闭用户手势操作,默认是开启的

starView.isUserInteractionEnabled = false//不支持用户手势操作

1.3支持滑动评分,默认只支持点击评分,不支持滑动评分

starView.userPanEnabled = true //滑动

1.4支持0.1颗星评分,默认整颗星

starView.integerStar = false // 完整星星

1.5滑动或点击后运动到手指位置所需时间

starView.followDuration = 0.1//滑动或点击后跟随到达时间,默认0.1秒

1.6当控件复用时,可修改当前星星数

starView.currentStarCount = 1 //当前显示的评星数

2、通过协议代理返回评分后的分数,别忘记了准守协议哦

starView.delegate = self


func starRate(view starRateView: JNStarRateView, score: Float) {
     print(score)
}

更详细的讲解请看http://www.jianshu.com/p/ea88987a7e87

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].