//
//  QuestionStarTableViewCell.m
//  patrol
//
//  Created by 曹云霄 on 2016/10/9.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#import "QuestionStarTableViewCell.h"
@implementation QuestionStarTableViewCell



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.backgroundColor = [UIColor clearColor];
        [self createSatrView:reuseIdentifier];
    }
    return self;
}

#pragma mark - 新建星星
- (void)createSatrView:(NSString *)reuseIdentifier
{
    NSArray *parameter = [reuseIdentifier componentsSeparatedByString:@"+"];
    CGFloat offsetX = 15;//边界距离
    ASStarRatingView *starView = [[ASStarRatingView alloc] initWithFrame:CGRectMake(offsetX, 10, ScreenSize.width-(offsetX * 2), 30)];
    starView.canEdit = YES;
    starView.maxRating = [parameter[1] intValue];
    starView.rating = [parameter[2] intValue];
    self.starView = starView;
    [self.contentView addSubview:starView];
}

















@end
