PeopleInformationView.m 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // PeopleInformationView.m
  3. // BuguLive
  4. //
  5. // Created by ycp on 16/10/18.
  6. // Copyright © 2016年 xfg. All rights reserved.
  7. //
  8. #import "PeopleInformationView.h"
  9. @implementation PeopleInformationView
  10. - (id)initWithFrame:(CGRect)frame
  11. {
  12. if (self = [super initWithFrame:frame]) {
  13. _nameLabel =[[UILabel alloc] init];
  14. _vipImageView = [[UIImageView alloc]init];
  15. _sexImageView =[[UIImageView alloc] init];
  16. _levelImageView =[[UIImageView alloc] init];
  17. _editButton =[UIButton buttonWithType:UIButtonTypeCustom];
  18. _nameLabel.font =[UIFont systemFontOfSize:14];
  19. _nameLabel.textColor =RGB(74, 75, 76);
  20. [_editButton setImage:[UIImage imageNamed:@"fw_me_bianji"] forState:UIControlStateNormal];
  21. [_editButton addTarget:self action:@selector(editClickButton) forControlEvents:UIControlEventTouchUpInside];
  22. [self addSubview:_nameLabel];
  23. [self addSubview:_sexImageView];
  24. [self addSubview:_vipImageView];
  25. [self addSubview:_levelImageView];
  26. [self addSubview:_editButton];
  27. }
  28. return self;
  29. }
  30. - (void)editClickButton{
  31. if ([_delegate respondsToSelector:@selector(editClickButton)]) {
  32. [_delegate editClickButton];
  33. }
  34. }
  35. @end