Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tinyq/tqstarratingview
iOS 星星评分视图控件,点击和滑动评分。
https://github.com/tinyq/tqstarratingview
objective-c rating-stars
Last synced: 7 days ago
JSON representation
iOS 星星评分视图控件,点击和滑动评分。
- Host: GitHub
- URL: https://github.com/tinyq/tqstarratingview
- Owner: TinyQ
- License: mit
- Created: 2013-08-28T07:37:14.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-12-30T10:39:08.000Z (about 7 years ago)
- Last Synced: 2025-02-01T18:01:44.367Z (7 days ago)
- Topics: objective-c, rating-stars
- Language: Objective-C
- Homepage:
- Size: 121 KB
- Stars: 215
- Watchers: 5
- Forks: 46
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
TQStarRatingView
================## 星星评分控件
iOS 星星评分视图控件,点击和滑动评分。
#### 控件效果
![Image text](READMEIMAGE/TQStarRatingView.gif)
#### 初始化
```objective-c
TQStarRatingView *starRatingView = [[TQStarRatingView alloc] initWithFrame:CGRectMake(30, 200, 250, 50)
numberOfStar:5];
starRatingView.delegate = self;
[self.view addSubview:starRatingView];
```
#### 委托回调处理分数变更```objective-c
-(void)starRatingView:(TQStarRatingView *)view score:(float)score{
self.scoreLabel.text = [NSString stringWithFormat:@"%0.2f",score * 10 ];
}```
#### 用代码设置分数 参数需要在0-1之间。```objective-c
[self.starRatingView setScore:0.5f withAnimation:YES];
```
```objective-c[self.starRatingView setScore:0.5f withAnimation:YES completion:^(BOOL finished){
NSLog(@"%@",@"starOver");
}];```
#### About TinyQ