123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // RQProfileLogoutCell.m
- // JSJP
- //
- // Created by 张嵘 on 2021/8/2.
- //
- #import "RQProfileLogoutCell.h"
- @interface RQProfileLogoutCell ()
- @property (nonatomic, readwrite, strong) RQProfileLogouItemViewModel *viewModel;
- @property (weak, nonatomic) IBOutlet UIButton *logoutBtn;
- @end
- @implementation RQProfileLogoutCell
- #pragma mark - PublicMethods
- + (instancetype)cellWithTableView:(UITableView *)tableView {
- static NSString *ID = @"RQProfileLogoutCell";
- RQProfileLogoutCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
- if (!cell) {
- cell = [self rq_viewFromXib];
- cell.selectionStyle = UITableViewCellSelectionStyleNone;
- }
- cell.logoutBtn.layer.cornerRadius = RQ_FIT_HORIZONTAL(40.f) / 2.f;
- return cell;
- }
- - (void)bindViewModel:(RQProfileLogouItemViewModel *)viewModel {
- _viewModel = viewModel;
- }
- #pragma mark - SystemMethods
- - (void)awakeFromNib {
- [super awakeFromNib];
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- - (IBAction)logoutAction:(id)sender {
- // [_viewModel.logoutCommand execute:nil];
- [_viewModel.logoutSubject sendNext:nil];
- }
- @end
|