Skip to content

developertom223/useStar

 
 

Repository files navigation

FinalStarRatingBar

StarRating Bar,星星打分控件

How to use?

Create star rating bar.(5 Stars)

FinalStarRatingBar *bar = [[FinalStarRatingBar alloc] initWithFrame:CGRectMake(0, 40, 320, 40)];
[self.view addSubView:bar];

Want more stars?

FinalStarRatingBar *bar = [[FinalStarRatingBar alloc] initWithFrame:CGRectMake(0, 40, 320, 40) starCount:10];
[self.view addSubview:bar];

Use in storyboard or nib

1.Drag a view to the nib.

2.Set its class to FinalRatingBar.

3.Use tag property to control the number of the stars.

Receive rating changed notification

[bar2 setRatingChangedBlock:^(NSUInteger rating) {
    NSLog(@"%d",rating);
}];

Others

Set Rating

bar.rating = 3;

Disable Touch

bar.enabled = NO;

Demo

Demo

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 93.6%
  • Ruby 6.4%