1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //
- // KBSignPopView.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/9/28.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "KBSignPopView.h"
- @implementation KBSignPopView
- - (instancetype)initWithFrame:(CGRect)frame text:(NSString *)text {
- self = [super initWithFrame:frame];
- if (self) {
- self.layer.cornerRadius = Fitsize(8);
- // self.backgroundColor = [UIColor whiteColor];
- UIImageView *icon = [[UIImageView alloc] initWithFrame:self.bounds];
- icon.contentMode = UIViewContentModeScaleAspectFill;
- icon.centerX = self.width/2;
- icon.image = [UIImage imageNamed:@"eve_qian"];
- [self addSubview:icon];
-
- UILabel *des = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, self.width-20, Fitsize(200))];
- des.numberOfLines = 0;
- des.textColor = [UIColor YHColorWithHex:0x2A2A2A];
- des.font = [UIFont systemFontOfSize:Fitsize(14)];
- des.text = text;
- [des sizeToFit];
- des.centerX = self.width/2;
- des.textAlignment = NSTextAlignmentCenter;
- des.y = Fitsize(220);
- [self addSubview:des];
- self.clickBtn = [UIButton buttonWithType:UIButtonTypeCustom];
- self.clickBtn.frame = CGRectMake(0, self.height-20-Fitsize(37), FITSIZE(188), FITSIZE(37));
- self.clickBtn.hidden = YES;
- [self addSubview:self.clickBtn];
- self.clickBtn.backgroundColor = [UIColor colorWithHexString:@"#FC1E67"];
- [self.clickBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
- self.clickBtn.layer.masksToBounds = YES;
- self.clickBtn.layer.cornerRadius = FITSIZE(5);
- [self.clickBtn setTitle:@"签到领红包" forState:UIControlStateNormal];
- self.clickBtn.centerX = self.width/2;
- }
- return self;
- }
- @end
|