// // GenerateOrdersTableViewCell.m // Lighting // // Created by 曹云霄 on 16/5/5. // Copyright © 2016年 上海勾芒科技有限公司. All rights reserved. // #import "GenerateOrdersTableViewCell.h" @implementation GenerateOrdersTableViewCell - (void)awakeFromNib { [super awakeFromNib]; // Initialization code } #pragma mark -赋值 - (void)setNewModel:(AddressModel *)NewModel { _NewModel = NewModel; self.isSelectedButton.selected = NewModel.isSelected; self.consigneeName.text = _NewModel.name; self.consigneemobile.text = _NewModel.miblephone; if (_NewModel.province && _NewModel.city) { if (![_NewModel.province isEqualToString:_NewModel.city]) { self.consigneeAddress.text = [NSString stringWithFormat:@"%@%@%@",_NewModel.province,_NewModel.city,_NewModel.address]; }else { self.consigneeAddress.text = [NSString stringWithFormat:@"%@%@",_NewModel.city,_NewModel.address]; } }else { self.consigneeAddress.text = [NSString stringWithFormat:@"%@",_NewModel.address]; } } #pragma mark -选中按钮 - (IBAction)SelectedButtonClick:(UIButton *)sender { if (self.blockSeletced) { self.blockSeletced(self.indexNumber); } sender.selected = YES; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end