// // JXQuestionCell.m // shiku_im // // Created by 123 on 2020/5/10. // Copyright © 2020 Reese. All rights reserved. // #import "JXQuestionCell.h" @interface JXQuestionCell() @property (weak, nonatomic) IBOutlet UIImageView *duiXIMG2; @property (weak, nonatomic) IBOutlet UIImageView *duiXIMG; @property (weak, nonatomic) IBOutlet UIImageView *duiIMG; @property (weak, nonatomic) IBOutlet UIImageView *duiduiIMG2; @property (weak, nonatomic) IBOutlet UILabel *titleL; @end @implementation JXQuestionCell - (void)awakeFromNib { [super awakeFromNib]; // Initialization code } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } + (instancetype)cellWithTableView:(UITableView *)tableView { static NSString *ID = @"JXQuestionCell"; JXQuestionCell *cell = [tableView dequeueReusableCellWithIdentifier:ID]; if (!cell) { cell = [[NSBundle mainBundle] loadNibNamed:@"JXQuestionCell" owner:nil options:nil].firstObject; cell.selectionStyle=UITableViewCellSelectionStyleNone; } cell.backgroundColor=[UIColor clearColor]; return cell; } -(void)createUI:(OptionsJX *)optionModel andDui:(NSInteger)index andSelect:(NSInteger)indexPath andCell:(NSInteger)indexRow{ _optionModel=optionModel; self.titleL.text = [NSString stringWithFormat:@"%@",optionModel.title]; if (index==indexRow) { self.duiXIMG2.hidden=NO; if (index==indexPath) { self.duiduiIMG2.hidden=NO; }else{ } }else{ if (indexPath==indexRow) { self.duiIMG.hidden=NO; self.duiXIMG.hidden=NO; }else{ self.duiIMG.hidden=YES; self.duiXIMG.hidden=YES; } } } -(void)setOptionModel:(OptionsJX *)optionModel{ _optionModel=optionModel; self.titleL.text = [NSString stringWithFormat:@"%@",optionModel.title]; } @end