// // RADetailActionSubCell.m // Apex And Drivers // // Created by Jack on 2018/6/2. // Copyright © 2018年 USAI. All rights reserved. // #import "RADetailActionSubCell.h" #import "RADetailActionModel.h" @interface RADetailActionSubCell () @property (strong, nonatomic) IBOutlet UIButton *actionTitleBtn; @end @implementation RADetailActionSubCell - (void)awakeFromNib { [super awakeFromNib]; self.layer.borderWidth = 0.5f; self.layer.borderColor = [UIColor darkGrayColor].CGColor; self.layer.cornerRadius = 5.0f; self.layer.masksToBounds = YES; } - (void)setModel:(RADetailActionModel *)model { _model = model; [self.actionTitleBtn setTitle:model.actionTitle forState:UIControlStateNormal]; } - (void)prepareForReuse { [super prepareForReuse]; self.model = nil; self.delegate = nil; } - (IBAction)actionBtnClick:(UIButton *)sender { if (self.delegate && [self.delegate respondsToSelector:@selector(actionSubCell:didClickForModel:)]) { [self.delegate actionSubCell:self didClickForModel:self.model]; } } @end