Skip to content

bismasaeed00/BSRatingView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

BSRatingView

This library is to show rating as stars.

How To Use:

Drop BSRating.h & BSRating.m in your project and import it

#import "BSRating.h"

BSRating *rating=[[BSRating alloc] initWithFrame:CGRectMake(20, 50, 110, 20) withStarCount:5 filledCount:3 ratingType:BSRatingTypeOutlined withColor:[UIColor blueColor]];
[self.view addSubview:rating];
    
BSRating *rating2=[[BSRating alloc] initWithFrame:CGRectMake(20, 120, 100, 20) withStarCount:10 filledCount:7 ratingType:BSRatingTypeGrayed withColor:[UIColor redColor]];
[self.view addSubview:rating2];

Storyboard support:

Now, you can add a UIView in storyboard, assign it's class to BSRating and ratingView will be there. Just use specific customization in the controller.

Customisation

You can customize BSRatingView using these methods.

-(void)setRatingColor:(UIColor*)color;
-(void)setRatingType:(BSRatingType)ratingType;
-(void)settTotalStars:(int)totalStars;
-(void)setFilledValue:(float)filledValue;

alt tag

About

This library is to show rating as stars.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published