1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// VideoListItemTableViewCell.m
// Lighting
//
// Created by 曹云霄 on 2016/11/25.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "VideoListItemTableViewCell.h"
@implementation VideoListItemTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
self.studyProgressView = [[PNCircleChart alloc]initWithFrame:CGRectMake(0, 0, 30, 30) total:@100 current:@0 clockwise:YES shadow:YES shadowColor:[UIColor lightGrayColor] displayCountingLabel:YES overrideLineWidth:@2];
[self.studyProgressView setStrokeColor:[UIColor colorWithHue:0.00 saturation:0.50 brightness:0.93 alpha:1.00]];
[self.studyProgressView strokeChart];
self.studyProgressView.countingLabel.font = [UIFont systemFontOfSize:8];
self.studyProgressView.displayAnimated = NO;
[self.seekbarView addSubview:self.studyProgressView];
}
- (void)setModel:(CustomStudyEntity *)model
{
_model = model;
self.studyItemTitleLabel.text = _model.title;
self.studyItemTimeLabel.text = _model.videoLength;
[self.studyProgressView updateChartByCurrent:[NSNumber numberWithInteger:[_model.attachment.playPercent floatValue]*100]];
//考核状态
if ([BaseViewController isBlankString:_model.examResult] || [_model.examResult isEqualToString:@"0"]) {
self.examResultImageView.hidden = YES;
}else {
self.examResultImageView.hidden = NO;
}
}
@end