All Projects → liaojinxing → StarRatingView

liaojinxing / StarRatingView

Licence: MIT license
Star rating view, often used in vote. Easy to use, and flexible configurations.

Programming Languages

objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

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

公众号

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].