|
@@ -25,26 +25,34 @@
|
|
|
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
|
|
}
|
|
|
|
|
|
-- (void)configWithEvaluateMessage:(NSString *)evaluateMessage hasEvaluate:(BOOL)hasEvaluate {
|
|
|
-
|
|
|
- if (hasEvaluate) {
|
|
|
- self.emptyView.hidden = YES;
|
|
|
- if (![NSString isEmptyString:evaluateMessage]) {
|
|
|
- NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
|
|
- [paragraphStyle setLineSpacing:4];//调整行间距
|
|
|
- NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:evaluateMessage attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x333333)}];
|
|
|
- self.contentLabel.attributedText = attr;
|
|
|
+- (void)configWithEvaluateMessage:(NSString *)evaluateMessage courseStatus:(NSString *)courseStatus hasEvaluate:(BOOL)hasEvaluate {
|
|
|
+ NSString *tipsDesc = @"";
|
|
|
+ if ([courseStatus isEqualToString:@"COMPLETE"]) {
|
|
|
+ tipsDesc = @"老师尚未评价";
|
|
|
+ if (hasEvaluate) {
|
|
|
+ self.emptyView.hidden = YES;
|
|
|
+ if (![NSString isEmptyString:evaluateMessage]) {
|
|
|
+ NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
|
|
+ [paragraphStyle setLineSpacing:4];//调整行间距
|
|
|
+ NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:evaluateMessage attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x333333)}];
|
|
|
+ self.contentLabel.attributedText = attr;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ self.contentLabel.attributedText = nil;
|
|
|
+ }
|
|
|
}
|
|
|
else {
|
|
|
+ self.emptyView.hidden = NO;
|
|
|
self.contentLabel.attributedText = nil;
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
else {
|
|
|
+ tipsDesc = @"课程结束之后老师才能对您的学习进行评价哦";
|
|
|
self.emptyView.hidden = NO;
|
|
|
self.contentLabel.attributedText = nil;
|
|
|
}
|
|
|
|
|
|
- NSString *tipsDesc = @"老师尚未评价";
|
|
|
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
|
|
[paragraphStyle setLineSpacing:4];//调整行间距
|
|
|
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:tipsDesc attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x999999)}];
|