RADetailActionSubCell.m 881 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // RADetailActionSubCell.m
  3. // Apex And Drivers
  4. //
  5. // Created by Jack on 2018/6/2.
  6. // Copyright © 2018年 USAI. All rights reserved.
  7. //
  8. #import "RADetailActionSubCell.h"
  9. #import "RADetailActionModel.h"
  10. @interface RADetailActionSubCell ()
  11. @property (strong, nonatomic) IBOutlet UIButton *actionTitleBtn;
  12. @end
  13. @implementation RADetailActionSubCell
  14. - (void)setModel:(RADetailActionModel *)model {
  15. _model = model;
  16. [self.actionTitleBtn setTitle:model.actionTitle forState:UIControlStateNormal];
  17. }
  18. - (void)prepareForReuse {
  19. [super prepareForReuse];
  20. self.model = nil;
  21. self.delegate = nil;
  22. }
  23. - (IBAction)actionBtnClick:(UIButton *)sender {
  24. if (self.delegate && [self.delegate respondsToSelector:@selector(actionSubCell:didClickForModel:)]) {
  25. [self.delegate actionSubCell:self didClickForModel:self.model];
  26. }
  27. }
  28. @end