StarRatingView
StarRatingView copied to clipboard
Star rating view, often used in vote. Easy to use, and flexible configurations.
StarRatingView
Star rating view, often used in vote. Easy to use, and flexible configurations.


Installation
- Grab the source file into your project.
- Or use cocoapods. Here is an example of your podfile:
pod 'StarRatingView'
Usage
StarRatingView *ratingView = [[StarRatingView alloc] initWithFrame:CGRectMake(0, 100, self.view.frame.size.width, 20) configuration:configuration];
ratingView.rating = 4.0f; // rate range:[0,5]
Configure the view if you need it:
StarRatingViewConfiguration *conf = [[StarRatingViewConfiguration alloc] init];
conf.rateEnabled = YES;
conf.starWidth = 40.0f;
conf.fullImage = @"ic_starwhite.png";
conf.halfImage = @"ic_starwhitehalf.png";
conf.emptyImage = @"ic_starwhiteept";
License
StarRatingView is available under the MIT license. See the LICENSE file for more info.
Subscription
欢迎关注简书,关注微信公众号(iOSers),订阅高质量原创技术文章: