JXQuestionCell.m 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. //
  2. // JXQuestionCell.m
  3. // shiku_im
  4. //
  5. // Created by 123 on 2020/5/10.
  6. // Copyright © 2020 Reese. All rights reserved.
  7. //
  8. #import "JXQuestionCell.h"
  9. @interface JXQuestionCell()
  10. @property (weak, nonatomic) IBOutlet UIImageView *duiXIMG2;
  11. @property (weak, nonatomic) IBOutlet UIImageView *duiXIMG;
  12. @property (weak, nonatomic) IBOutlet UIImageView *duiIMG;
  13. @property (weak, nonatomic) IBOutlet UIImageView *duiduiIMG2;
  14. @property (weak, nonatomic) IBOutlet UILabel *titleL;
  15. @end
  16. @implementation JXQuestionCell
  17. - (void)awakeFromNib {
  18. [super awakeFromNib];
  19. // Initialization code
  20. }
  21. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  22. [super setSelected:selected animated:animated];
  23. // Configure the view for the selected state
  24. }
  25. + (instancetype)cellWithTableView:(UITableView *)tableView
  26. {
  27. static NSString *ID = @"JXQuestionCell";
  28. JXQuestionCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
  29. if (!cell) {
  30. cell = [[NSBundle mainBundle] loadNibNamed:@"JXQuestionCell" owner:nil options:nil].firstObject;
  31. cell.selectionStyle=UITableViewCellSelectionStyleNone;
  32. }
  33. cell.backgroundColor=[UIColor clearColor];
  34. return cell;
  35. }
  36. -(void)createUI:(OptionsJX *)optionModel andDui:(NSInteger)index andSelect:(NSInteger)indexPath andCell:(NSInteger)indexRow{
  37. _optionModel=optionModel;
  38. self.titleL.text = [NSString stringWithFormat:@"%@",optionModel.title];
  39. if (index==indexRow) {
  40. self.duiduiIMG2.hidden=NO;
  41. if (index==indexPath) {
  42. self.duiXIMG.hidden=NO;
  43. }else{
  44. }
  45. }else{
  46. if (indexPath==indexRow) {
  47. self.duiIMG.hidden=NO;
  48. self.duiXIMG.hidden=NO;
  49. }else{
  50. //self.duiIMG.hidden=NO;
  51. self.duiIMG.hidden=YES;
  52. self.duiXIMG.hidden=YES;
  53. }
  54. }
  55. }
  56. -(void)setOptionModel:(OptionsJX *)optionModel{
  57. _optionModel=optionModel;
  58. self.titleL.text = [NSString stringWithFormat:@"%@",optionModel.title];
  59. }
  60. @end