RASettingActionCell.m 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // RASettingActionCell.m
  3. // Apex And Drivers
  4. //
  5. // Created by Jack on 2018/9/12.
  6. // Copyright © 2018年 USAI. All rights reserved.
  7. //
  8. #import "RASettingActionCell.h"
  9. #import "RASettingActionModel.h"
  10. @interface RASettingActionCell ()
  11. @property (nonatomic,strong) IBOutlet UILabel *titleLabel;
  12. @property (nonatomic,strong) IBOutlet UIActivityIndicatorView *activityIndicator;
  13. @end
  14. @implementation RASettingActionCell
  15. - (void)awakeFromNib {
  16. [super awakeFromNib];
  17. // Initialization code
  18. self.activityIndicator.tintColor = ApexDriverOrangeColor;
  19. }
  20. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  21. [super setSelected:selected animated:animated];
  22. // Configure the view for the selected state
  23. }
  24. - (void)refreshUI {
  25. RASettingActionModel *model = (RASettingActionModel *)self.model;
  26. NSString *title = model.title;
  27. BOOL active = model.active;
  28. self.titleLabel.text = title;
  29. if (active) {
  30. [self.activityIndicator startAnimating];
  31. } else{
  32. [self.activityIndicator stopAnimating];
  33. }
  34. }
  35. @end