// // DelectMessageTableViewCell.m // watch // // Created by WeiChaoZheng on 2018/1/27. // Copyright © 2018年 xTT. All rights reserved. // #import "MessageTableViewCell.h" @implementation MessageTableViewCell -(void)setIsDelect:(BOOL)isDelect{ _isDelect = isDelect; if(_isDelect){ self.selectImageWidth.constant = 25; }else{ self.selectImageWidth.constant = 0; } } - (void)awakeFromNib { [super awakeFromNib]; [self.agreeBtn setTitle:GJText(@"同意") forState:0]; [self.reFusalBtn setTitle:GJText(@"拒绝") forState:0]; self.aTitleLabel.textColor = KKMainColor; self.selectionStyle = 0; self.agreeBtn.layer.cornerRadius = 3; self.agreeBtn.layer.masksToBounds = YES; self.reFusalBtn.layer.cornerRadius = 3; self.reFusalBtn.layer.masksToBounds = YES; //默认 _agreeBtnHeightNSCL.constant = 0; _reFusalBtnHeightNSCL.constant = 0; [self.agreeBtn setHidden:YES]; [self.reFusalBtn setHidden:YES]; [self.agreeBtn setBackgroundColor:KKMainColor]; [self.reFusalBtn setBackgroundColor:KKMainColor]; } -(void)setIsApplicationRrecord:(BOOL)isApplicationRrecord{ _isApplicationRrecord = isApplicationRrecord; self.isDelect = NO; if (_isApplicationRrecord) { _agreeBtnHeightNSCL.constant = 25; _reFusalBtnHeightNSCL.constant = 25; [self.agreeBtn setHidden:NO]; [self.reFusalBtn setHidden:NO]; }else{ _agreeBtnHeightNSCL.constant = 0; _reFusalBtnHeightNSCL.constant = 0; [self.agreeBtn setHidden:YES]; [self.reFusalBtn setHidden:YES]; } } - (IBAction)noAction:(id)sender { if(self.agreeOrNOBlock){ self.agreeOrNOBlock(NO); } } - (IBAction)argeeAction:(id)sender { if(self.agreeOrNOBlock){ self.agreeOrNOBlock(YES); } } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; } @end