Code Monkey home page Code Monkey logo

tqstarratingview's Introduction

TQStarRatingView

星星评分控件

IOS 星星评分视图控件,点击和滑动评分。

控件效果

Image text

初始化

TQStarRatingView *starRatingView = [[TQStarRatingView alloc] initWithFrame:CGRectMake(30, 200, 250, 50)
                                                                  numberOfStar:5];
starRatingView.delegate = self;
[self.view addSubview:starRatingView];

委托回调处理分数变更

-(void)starRatingView:(TQStarRatingView *)view score:(float)score
{
 	self.scoreLabel.text = [NSString stringWithFormat:@"%0.2f",score * 10 ];
}

用代码设置分数 参数需要在0-1之间。

[self.starRatingView setScore:0.5f withAnimation:YES];
[self.starRatingView setScore:0.5f withAnimation:YES completion:^(BOOL finished)
{
    NSLog(@"%@",@"starOver");
}];

About TinyQ

email : [email protected]

blogs : http://tinyq.me

tqstarratingview's People

Contributors

tinyq avatar jimneylee avatar

Watchers

daveztong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.