// // RASettingActionCell.m // Apex And Drivers // // Created by Jack on 2018/9/12. // Copyright © 2018年 USAI. All rights reserved. // #import "RASettingActionCell.h" #import "RASettingActionModel.h" @interface RASettingActionCell () @property (nonatomic,strong) IBOutlet UILabel *titleLabel; @property (nonatomic,strong) IBOutlet UIActivityIndicatorView *activityIndicator; @property (nonatomic,strong) IBOutlet UILabel *sizeLabel; @end @implementation RASettingActionCell - (void)awakeFromNib { [super awakeFromNib]; // Initialization code self.activityIndicator.tintColor = ApexDriverOrangeColor; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } - (void)refreshUI { RASettingActionModel *model = (RASettingActionModel *)self.model; NSString *title = model.title; BOOL active = model.active; self.titleLabel.text = title; if (active) { [self.activityIndicator startAnimating]; self.sizeLabel.hidden = YES; } else{ [self.activityIndicator stopAnimating]; self.sizeLabel.hidden = NO; } self.sizeLabel.text = model.detail; } @end