Skip to content

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

License

Notifications You must be signed in to change notification settings

liaojinxing/StarRatingView

Repository files navigation

StarRatingView

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

StarRating1

StarRating2

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),订阅高质量原创技术文章:

公众号

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published