52 lines
1.5 KiB
Objective-C
52 lines
1.5 KiB
Objective-C
//
|
|
// IFishHotBarCell.m
|
|
// Ifish
|
|
//
|
|
// Created by 罗艺 on 2018/8/22.
|
|
// Copyright © 2018年 lianlian. All rights reserved.
|
|
//
|
|
|
|
#import "IFishHotBarCell.h"
|
|
|
|
@interface IFishHotBarCell()
|
|
@property (weak, nonatomic) IBOutlet UILabel *titleLbale;
|
|
@property (weak, nonatomic) IBOutlet UILabel *subTitleLable;
|
|
@property (weak, nonatomic) IBOutlet UIImageView *iconImgV;
|
|
|
|
@property (weak, nonatomic) IBOutlet UIImageView *arrowImgV;
|
|
@end
|
|
|
|
@implementation IFishHotBarCell
|
|
|
|
- (void)awakeFromNib {
|
|
[super awakeFromNib];
|
|
[self.subTitleLable mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.mas_equalTo(self.titleLbale.mas_right).offset(20);
|
|
make.centerY.height.mas_equalTo(self.titleLbale);
|
|
}];
|
|
[self.subTitleLable setTextColor:[UIColor colorWithRed:109/255.0 green:109/255.0 blue:109/255.0 alpha:1.0]];
|
|
// Initialization code
|
|
}
|
|
|
|
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
|
[super setSelected:selected animated:animated];
|
|
|
|
// Configure the view for the selected state
|
|
}
|
|
|
|
-(void)setVo:(IfishHotBarVo *)vo{
|
|
_vo=vo;
|
|
self.titleLbale.text=vo.title;
|
|
self.subTitleLable.text=vo.subTitle;
|
|
self.iconImgV.image=[UIImage imageNamed:vo.iconUrl];
|
|
self.arrowImgV.hidden=!vo.isShowArrow;
|
|
[self.subTitleLable setTextColor:[UIColor colorWithRed:109/255.0 green:109/255.0 blue:109/255.0 alpha:1.0]];
|
|
if ((vo.phv!=499)&&[vo.title isEqualToString:@"水泵流量"]) {//水泵流量无水
|
|
[self.subTitleLable setTextColor:[UIColor redColor]];
|
|
}else{//正常
|
|
}
|
|
|
|
}
|
|
|
|
@end
|