口袋优选

KBShowFansHelpView.m 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // KBShowFansHelpView.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/7/12.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "KBShowFansHelpView.h"
  9. @implementation KBShowFansHelpView
  10. - (instancetype)initWithFrame:(CGRect)frame {
  11. self = [super initWithFrame:frame];
  12. if (self) {
  13. self.backgroundColor = [UIColor whiteColor];
  14. self.layer.cornerRadius = 6;
  15. [self initSubViews];
  16. }
  17. return self;
  18. }
  19. - (void)initSubViews {
  20. UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(0, 12, 100, 20)];
  21. title.textColor = [UIColor YHColorWithHex:0x383838];
  22. title.centerX = self.width/2;
  23. title.font = [UIFont boldSystemFontOfSize:Fitsize(17)];
  24. title.textAlignment = NSTextAlignmentCenter;
  25. title.text = @"潜在好友";
  26. [self addSubview:title];
  27. UILabel *des = [[UILabel alloc] initWithFrame:CGRectMake(40, title.bottom+20,self.width-80 , 84)];
  28. des.font = [UIFont systemFontOfSize:14];
  29. des.textColor = [UIColor YHColorWithHex:0x333333];
  30. des.text = @"潜在好友是指通过扫描过你的二维码与你绑定关系但未注册的用户,你可以引导他们下载注册App成为真正的好友";
  31. des.numberOfLines = 0;
  32. [self addSubview:des];
  33. UIButton *sure = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 126, 37)];
  34. sure.layer.cornerRadius = 9;
  35. sure.backgroundColor = [UIColor homeRedColor];
  36. sure.titleLabel.font = [UIFont systemFontOfSize:18];
  37. sure.titleLabel.textColor = [UIColor whiteColor];
  38. sure.bottom = self.height-15;
  39. sure.centerX = self.width/2;
  40. [sure setTitle:@"知道了" forState:UIControlStateNormal];
  41. [sure addTarget:self action:@selector(sureAction) forControlEvents:UIControlEventTouchUpInside];
  42. [self addSubview:sure];
  43. }
  44. - (void)sureAction {
  45. if (self.dismissAction) {
  46. self.dismissAction();
  47. }
  48. }
  49. @end