EditCell.m 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. //
  2. // EditCell.m
  3. // YBVideo
  4. //
  5. // Created by YunBao on 2018/6/14.
  6. // Copyright © 2018年 cat. All rights reserved.
  7. //
  8. #import "EditCell.h"
  9. @implementation EditCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. if ([lagType isEqual:ZH_CN]) {
  13. _leftNameWidth.constant = 60;
  14. }else{
  15. _leftNameWidth.constant = 80;
  16. }
  17. _nameL.text = YZMsg(@"昵称");
  18. _nameTF.placeholder = YZMsg(@"请输入昵称");
  19. _birthL.text = YZMsg(@"生日");
  20. _birthTF.placeholder = YZMsg(@"请选择生日");
  21. _sexL.text = YZMsg(@"性别");
  22. _sexTF.placeholder = YZMsg(@"请选择性别");
  23. _localL.text = YZMsg(@"地区");
  24. _locationTF.placeholder = YZMsg(@"选择您所在的地区");
  25. _signaL.text = YZMsg(@"签名");
  26. _signatoryTF.placeholder = YZMsg(@"留下点什么吧~");
  27. }
  28. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  29. [super setSelected:selected animated:animated];
  30. }
  31. +(EditCell*)cellWithTab:(UITableView *)tableView andIndexPath:(NSIndexPath*)indexPath{
  32. EditCell *cell;
  33. switch (indexPath.row) {
  34. case 0:{
  35. cell = [tableView dequeueReusableCellWithIdentifier:@"nickname"];
  36. if (!cell) {
  37. cell = [[[NSBundle mainBundle]loadNibNamed:@"EditCell" owner:nil options:nil]objectAtIndex:0];
  38. }
  39. cell.nameTF.placeCol = RGB_COLOR(@"#6F7073", 1);
  40. }break;
  41. case 1:{
  42. cell = [tableView dequeueReusableCellWithIdentifier:@"birth"];
  43. if (!cell) {
  44. cell = [[[NSBundle mainBundle]loadNibNamed:@"EditCell" owner:nil options:nil]objectAtIndex:1];
  45. }
  46. cell.birthTF.placeCol = RGB_COLOR(@"#6F7073", 1);
  47. }break;
  48. case 2:{
  49. cell = [tableView dequeueReusableCellWithIdentifier:@"sex"];
  50. if (!cell) {
  51. cell = [[[NSBundle mainBundle]loadNibNamed:@"EditCell" owner:nil options:nil]objectAtIndex:2];
  52. }
  53. cell.sexTF.placeCol = RGB_COLOR(@"#6F7073", 1);
  54. }break;
  55. case 3:{
  56. cell = [tableView dequeueReusableCellWithIdentifier:@"location"];
  57. if (!cell) {
  58. cell = [[[NSBundle mainBundle]loadNibNamed:@"EditCell" owner:nil options:nil]objectAtIndex:3];
  59. }
  60. cell.locationTF.placeCol = RGB_COLOR(@"#6F7073", 1);
  61. }break;
  62. case 4:{
  63. cell = [tableView dequeueReusableCellWithIdentifier:@"signatory"];
  64. if (!cell) {
  65. cell = [[[NSBundle mainBundle]loadNibNamed:@"EditCell" owner:self options:nil]objectAtIndex:4];
  66. }
  67. cell.signatoryTF.placeCol = RGB_COLOR(@"#6F7073", 1);
  68. }break;
  69. default:
  70. break;
  71. }
  72. return cell;
  73. }
  74. @end