12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- //
- // ZKFaceVerifyMsgView.m
- // JianYuIOS
- //
- // Created by apple on 2020/8/13.
- // Copyright © 2020 lixianglan. All rights reserved.
- //
- #import "ZKFaceVerifyMsgView.h"
- #import "ZKModal.h"
- @interface ZKFaceVerifyMsgView()
- @property (nonatomic,strong)UILabel *titleLabel;
- @property (nonatomic,strong)UILabel *descLabel;
- @end
- @implementation ZKFaceVerifyMsgView
- -(instancetype)initWithFrame:(CGRect)frame
- {
- if (self = [super initWithFrame:frame]) {
-
- self.backgroundColor = [UIColor whiteColor];
-
- self.layer.masksToBounds = YES;
- self.layer.cornerRadius = 10;
- CGFloat B_H = 50;
- UIButton *button = [ZKControl createButtonWithFrame:CGRectMake(0, self.height-B_H, self.width, B_H) title:@"知道了" titleColor:UIColorFromRGB(0x795441) titleFont:15 imageName:nil bgImageName:nil target:self method:@selector(doneClick)];
- UIView *lineView = [ZKControl createViewWithFrame:CGRectMake(0, self.height-B_H-1, self.width, 1) color:UIColorFromRGB(0xEEEEEE)];
- [self addSubview:button];
- [self addSubview:lineView];
-
- UILabel *titleLabel = [ZKControl createLabelWithFrame:CGRectMake(0, 0, self.width, 40) font:15 text:@"" TextAlignment:NSTextAlignmentCenter TextColor:UIColorFromRGB(0x000000) bgColor:nil];
- [self addSubview:titleLabel];
- self.titleLabel = titleLabel;
-
- UILabel *descLabel = [ZKControl createLabelWithFrame:CGRectMake(15, titleLabel.bottom, self.width-30, lineView.top-titleLabel.bottom) font:15 text:@"" TextAlignment:NSTextAlignmentCenter TextColor:UIColorFromRGB(0x000000) bgColor:nil];
- descLabel.alpha = 0.5;
- descLabel.numberOfLines = 0;
- [self addSubview:descLabel];
- self.descLabel = descLabel;
- }
-
- return self;
- }
- -(void)doneClick
- {
- [[ZKModal sharedInstance] hide];
- }
- -(void)show
- {
- [[ZKModal sharedInstance] showWithContentView:self andAnimated:YES];
- }
- -(void)dismiss
- {
- [[ZKModal sharedInstance] hide];
- }
- -(void)setTitleName:(NSString *)titleName
- {
- _titleName = titleName;
- self.titleLabel.text = _titleName;
- }
- -(void)setDescTitle:(NSString *)descTitle
- {
- _descTitle = descTitle;
- self.descLabel.text = _descTitle;
- self.descLabel.attributedText = [ZKMethod getAttributedStringWithString:self.descLabel.text lineSpace:5 with:Center];
- }
- /*
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect {
- // Drawing code
- }
- */
- @end
|