// // KBShowFansHelpView.m // YouHuiProject // // Created by 小花 on 2018/7/12. // Copyright © 2018年 kuxuan. All rights reserved. // #import "KBShowFansHelpView.h" @implementation KBShowFansHelpView - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.backgroundColor = [UIColor whiteColor]; self.layer.cornerRadius = 6; [self initSubViews]; } return self; } - (void)initSubViews { UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(0, 12, 100, 20)]; title.textColor = [UIColor YHColorWithHex:0x383838]; title.centerX = self.width/2; title.font = [UIFont boldSystemFontOfSize:Fitsize(17)]; title.textAlignment = NSTextAlignmentCenter; title.text = @"潜在好友"; [self addSubview:title]; UILabel *des = [[UILabel alloc] initWithFrame:CGRectMake(40, title.bottom+20,self.width-80 , 84)]; des.font = [UIFont systemFontOfSize:14]; des.textColor = [UIColor YHColorWithHex:0x333333]; des.text = @"潜在好友是指通过扫描过你的二维码与你绑定关系但未注册的用户,你可以引导他们下载注册App成为真正的好友"; des.numberOfLines = 0; [self addSubview:des]; UIButton *sure = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 126, 37)]; sure.layer.cornerRadius = 9; sure.backgroundColor = [UIColor homeRedColor]; sure.titleLabel.font = [UIFont systemFontOfSize:18]; sure.titleLabel.textColor = [UIColor whiteColor]; sure.bottom = self.height-15; sure.centerX = self.width/2; [sure setTitle:@"知道了" forState:UIControlStateNormal]; [sure addTarget:self action:@selector(sureAction) forControlEvents:UIControlEventTouchUpInside]; [self addSubview:sure]; } - (void)sureAction { if (self.dismissAction) { self.dismissAction(); } } @end