Latest 1.0
Homepage https://github.com/TinyQ/TQStarRatingView
License MIT The MIT License (MIT)

Copyright (c) 2013 TinyQ (http://tinyq.me/)

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Platforms ios , requires ARC
Authors

星星评分控件

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

Latest podspec

{
    "name": "TQStarRatingView",
    "version": "1.0",
    "summary": "iOS u661fu661fu8bc4u5206u89c6u56feu63a7u4ef6uff0cu70b9u51fbu548cu6ed1u52a8u8bc4u5206u3002",
    "description": "Star Rating Control, click on the slide to score a rating.",
    "homepage": "https://github.com/TinyQ/TQStarRatingView",
    "license": {
        "type": "MIT",
        "text": "tttttThe MIT License (MIT)nntttttCopyright (c) 2013 TinyQ (http://tinyq.me/)nntttttPermission is hereby granted, free of charge, to any person obtaining a copy ofntttttthis software and associated documentation files (the "Software"), to deal inntttttthe Software without restriction, including without limitation the rights tontttttuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies ofntttttthe Software, and to permit persons to whom the Software is furnished to do so,ntttttsubject to the following conditions:nntttttThe above copyright notice and this permission notice shall be included in allntttttcopies or substantial portions of the Software.nntttttTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORntttttIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESSntttttFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS ORntttttCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHERntttttIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR INntttttCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.n"
    },
    "authors": {
        "tinyq": "[email protected]"
    },
    "platforms": {
        "ios": null
    },
    "source": {
        "git": "https://github.com/TinyQ/TQStarRatingView.git",
        "tag": "1.0"
    },
    "source_files": "TQStarRatingView/TQStarRating/**/*.{h,m}",
    "resources": "TQStarRatingView/TQStarRating/**/*.png",
    "requires_arc": true
}

Pin It on Pinterest

Share This