123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- //
- // VipSubjectCollectionViewCell.m
- // jiaPei
- //
- // Created by 张嵘 on 2019/9/3.
- // Copyright © 2019 JCZ. All rights reserved.
- //
- #import "VipSubjectCollectionViewCell.h"
- @implementation VipSubjectCollectionViewCell
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- }
- - (void)setQuesTionItem:(QuesTionItem *)quesTionItem {
- _quesTionItem = quesTionItem;
- [[RACObserve(quesTionItem, isRight) takeUntil:self.rac_prepareForReuseSignal] subscribeNext:^(id _Nullable x) {
- switch (quesTionItem.isRight) {
- case 0:
- self.subjectBtn.backgroundColor = quesTionItem.isCurrent? UIColor.groupTableViewBackgroundColor : UIColor.whiteColor;
- // self.subjectBtn.borderWidth = 1;
- // self.subjectBtn.borderColor = quesTionItem.isCurrent? UIColor.darkGrayColor : UIColor.lightGrayColor;
- break;
- case 1:
- self.subjectBtn.backgroundColor = [UIColor colorWithRed:0.56 green:0.88 blue:0.71 alpha:1.00];
- // self.subjectBtn.borderWidth = quesTionItem.isCurrent? 1 : 0;
- // self.subjectBtn.borderColor = UIColor.greenColor;
- break;
- case 2:
- self.subjectBtn.backgroundColor = [UIColor colorWithRed:0.92 green:0.46 blue:0.36 alpha:1.00];
- // self.subjectBtn.borderWidth = quesTionItem.isCurrent? 1 : 0;
- // self.subjectBtn.borderColor = UIColor.redColor;
- break;
-
- default:
- break;
- }
- }];
- }
- @end
|