PersonCell.m 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // PersonCell.m
  3. // Haishenghai-master
  4. //
  5. // Created by GG on 2019/1/13.
  6. // Copyright © 2019年 Haishenghai intelligence network technology. All rights reserved.
  7. //
  8. #import "PersonCell.h"
  9. @implementation PersonCell
  10. -(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
  11. if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
  12. _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 5, 80, 44)];
  13. [self.contentView addSubview:_nameLabel];
  14. _phoneLabel = [[UILabel alloc]init];
  15. _phoneLabel.textColor = [UIColor blackColor];
  16. [self.contentView addSubview:_phoneLabel];
  17. _phoneLabel.frame = CGRectMake(70, 5, [UIScreen mainScreen].bounds.size.width-70, 44);
  18. _deleteButton.frame = CGRectMake([UIScreen mainScreen].bounds.size.width-64, 12, 20, 20);
  19. _deleteButton = [UIButton buttonWithType:UIButtonTypeCustom];
  20. [_deleteButton setBackgroundImage:[UIImage imageNamed:@"hsh_login_delete"] forState:UIControlStateNormal];
  21. [self.contentView addSubview:_deleteButton];
  22. }
  23. return self;
  24. }
  25. //-(void)layoutSubviews{
  26. // _phoneLabel.frame = CGRectMake(20, 5, [UIScreen mainScreen].bounds.size.width, 44);
  27. //
  28. // _deleteButton.frame = CGRectMake([UIScreen mainScreen].bounds.size.width-64, 12, 20, 20);
  29. //}
  30. - (void)awakeFromNib {
  31. [super awakeFromNib];
  32. // Initialization code
  33. }
  34. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  35. [super setSelected:selected animated:animated];
  36. // Configure the view for the selected state
  37. }
  38. @end