// // GIGaUserCityViewCell.m // GIGA // // Created by lianxiang on 2018/9/14. // Copyright © 2018年 com.giga.ios. All rights reserved. // #import "GIGaUserCityViewCell.h" @implementation GIGaUserCityViewCell - (void)awakeFromNib { [super awakeFromNib]; // Initialization code } -(void)loadCellData:(NSIndexPath*)indexPath user:(GiGaUser*)user{ if (indexPath.section == 2 && indexPath.row == 1) { self.cityLabel.text = @"生日"; if (user.birthday && ![user.birthday isKindOfClass:[NSNull class]] && ![user.birthday isEqualToString:@""]) { self.detalTitle.text = user.birthday; }else{ self.detalTitle.text = @"选择生日"; } }else if (indexPath.section == 2 && indexPath.row == 2){ self.cityLabel.text = @"城市"; if (!user.provinceName || [user.provinceName isKindOfClass:[NSNull class]]) { user.provinceName = @""; } if (!user.cityName || [user.cityName isKindOfClass:[NSNull class]]) { user.cityName = @""; } if (!user.areaName || [user.areaName isKindOfClass:[NSNull class]]) { user.areaName = @""; } if ([user.provinceName isEqualToString:@""] && [user.provinceName isEqualToString:@""] && [user.provinceName isEqualToString:@""] ) { self.detalTitle.text = @"选择城市"; }else{ self.detalTitle.text = [NSString stringWithFormat:@"%@%@%@",user.provinceName,user.cityName,user.areaName]; } }else if (indexPath.section == 2 && indexPath.row == 3){ self.cityLabel.text = @"职业"; if (user.occupationName && ![user.occupationName isKindOfClass:[NSNull class]] && ![user.occupationName isEqualToString:@""]) { self.detalTitle.text = user.occupationName; }else{ self.detalTitle.text = @"请从下方标签中选择一项"; } } } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end