1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // LockCell.m
- // LN_School
- //
- // Created by EchoShacolee on 2017/4/17.
- // Copyright © 2017年 Danson. All rights reserved.
- //
- #import "LockCell.h"
- @implementation LockCell
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- -(void)upDataWithDic:(NSDictionary *)dic{
-
- _nameLab.text = [NSString stringWithFormat:@"%@",dic[@"TLR_USER"]];
- _timeLab.text = [NSString stringWithFormat:@"%@",dic[@"TLR_OPE_DATE"]];
-
- if ([[NSString stringWithFormat:@"%@",dic[@"TLR_LOCK_STATUS"]] isEqualToString:@"1"]) {
- _statusLab.text = @"锁定";
- _statusLab.textColor = [UIColor redColor];
- }else{
- _statusLab.text = @"解锁";
- _statusLab.textColor = COLOR_THEME;
- }
-
- _reasonLab.text = [NSString stringWithFormat:@"%@",dic[@"TLR_LOCK_REASON"]];
- }
- + (CGFloat)heightForDic:(NSDictionary *)dic
- {
- // 而高度是动态返回的
- CGRect bounds = [dic[@"TLR_LOCK_REASON"] boundingRectWithSize:CGSizeMake(kSize.width-100, 1000) options:NSStringDrawingUsesLineFragmentOrigin attributes:[NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:14] forKey:NSFontAttributeName] context:nil];
- return 75+bounds.size.height;
- }
- @end
|