MPersonCenterCell.m 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //
  2. // MPersonCenterCell.m
  3. // BuguLive
  4. //
  5. // Created by 丁凯 on 2017/8/23.
  6. // Copyright © 2017年 xfg. All rights reserved.
  7. //
  8. #import "MPersonCenterCell.h"
  9. @implementation MPersonCenterCell
  10. - (void)awakeFromNib
  11. {
  12. [super awakeFromNib];
  13. self.leftImgView.contentMode = UIViewContentModeScaleAspectFit;
  14. self.lefLabel.textColor = kAppGrayColor1;
  15. self.rightLabel.textColor = kAppGrayColor3;
  16. self.backgroundColor = kClearColor;
  17. self.contentView.backgroundColor = kClearColor;
  18. self.viewLeftConstraint.constant = kRealValue(12);
  19. self.viewRightConstraint.constant = kRealValue(12);
  20. }
  21. - (void)creatCellWithImgStr:(NSString *)imgStr andLeftStr:(NSString *)leftStr andRightStr:(NSString *)rightStr andSection:(int)section
  22. {
  23. self.leftImgView.image = [UIImage imageNamed:imgStr];
  24. self.lefLabel.text = leftStr;
  25. self.rightLabel.text = [rightStr isEqualToString:@"no"] ? @"" : rightStr;
  26. if ([rightStr isEqualToString:ASLocalizedString(@"未认证")]) {
  27. self.rightLabel.textColor = [UIColor colorWithHexString:@"#9152F8"];
  28. }
  29. // if (section == MPCOutPutSection) //控制右边的箭头是否显示
  30. // {
  31. // self.rightImgView.hidden = YES;
  32. // }else
  33. // {
  34. // self.rightImgView.hidden = NO;
  35. // }
  36. // if (section == MPCexchangeCoinsSection || section == MPCContributeSection) //控制左边图片的大小
  37. // {
  38. // CGRect rect = self.leftImgView.frame;
  39. // rect.size.height = 21;
  40. // self.leftImgView.frame = rect;
  41. // }else if (section == MPCGoodsMSection)
  42. // {
  43. // CGRect rect = self.leftImgView.frame;
  44. // rect.size.height = 22.5;
  45. // self.leftImgView.frame = rect;
  46. // }else
  47. // {
  48. // CGRect rect = self.leftImgView.frame;
  49. // rect.size.height = 20;
  50. // self.leftImgView.frame = rect;
  51. // }
  52. // if (section == MPCOutPutSection || section == MPCGameSISection ||section == MPCShopCartSection || section == MPCAutionMSection || section == MPCMyLitteShopSection ||section == MPCTradeSection ||section == MPCSetSection)
  53. // {
  54. // self.lineView.hidden = YES;
  55. // }else
  56. // {
  57. // self.lineView.hidden = NO;
  58. // self.lineView.top = kRealValue(44) + 7;
  59. // }
  60. // if (section == MPCContributeSection) {
  61. // self.rightLabel.hidden = YES;
  62. // }
  63. }
  64. @end