123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- //
- // YOUPAILPYoungOpenWindow.m
- // livePro
- //
- // Created by leo on 2019/12/26.
- // Copyright © 2019 caiPro. All rights reserved.
- //
- #import "YOUPAIFinishMsgWindow.h"
- #import "NSString+YYAdd.h"
- @interface YOUPAIFinishMsgWindow ()<UIGestureRecognizerDelegate>
- @property(nonatomic,assign)CGFloat youpaiplefpadding,youpaipimgVHeight,youpaipimgVWidth,youpaiptitleHeight;
- @property(nonatomic,strong)UIImageView *youpaipimgV;
- @property(nonatomic,strong)UIButton *youpaipopenBtn;
- @property(nonatomic,strong)UILabel *youpaiptitleLab,*youpaipnoticeLab;
- @end
- @implementation YOUPAIFinishMsgWindow
- - (void)viewDidLoad {
- [super viewDidLoad];
- // [self.view setFrame:CGRectMake(0, 0, _vWith, _vHeight)];
- // CAShapeLayer *maskLayer = [CAShapeLayer layer];
- // UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:self.view.bounds cornerRadius:25];
- // maskLayer.path = path.CGPath;
- // self.view.layer.mask = maskLayer;
- // [self.view setBackgroundColor:[UIColor whiteColor]];
-
- _youpaipimgVWidth = self.vWidth;
- _youpaipimgVHeight = 257* self.vWidth/640.0;
- _youpaiplefpadding = (KScreenWidth-_youpaipimgVWidth)/2.0;
- [self.baseView addSubview:self.youpaipimgV];
- [self.baseView addSubview:self.youpaiptitleLab];
- [self.baseView addSubview:self.youpaipopenBtn];
- [self.baseView addSubview:self.youpaipnoticeLab];
-
-
- NSString *titleStr = @"完善资料后即可认识小哥哥小姐姐啦~";
- [_youpaiptitleLab setText:titleStr];
- CGSize titleSize = [titleStr sizeForFont:LCBoldFont(16) size:CGSizeMake(self.vWidth-104, 200) mode:NSLineBreakByWordWrapping];
- _youpaiptitleHeight = titleSize.height;
-
- [_youpaipopenBtn setTitle:@"完善资料" forState:UIControlStateNormal];
-
- [_youpaiptitleLab mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self.baseView).with.offset(25);
- make.right.equalTo(self.baseView).with.offset(-25);
- make.top.equalTo(_youpaipimgV.mas_bottom).with.offset(10);
- // make.height.mas_equalTo(_titleHeight);
-
- }];
-
- [_youpaipopenBtn mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self.baseView).with.offset(25);
- make.right.equalTo(self.baseView).with.offset(-25);
- make.top.equalTo(_youpaiptitleLab.mas_bottom).with.offset(20);
- make.height.mas_equalTo(48);
- }];
- [_youpaipopenBtn setBackgroundImage:[LCTools ColorImage:CGSizeMake(230, 48) FromColors:@[LZBFB6FFColor,LZ7C69FEColor] ByGradientType:1] forState:UIControlStateNormal];
-
-
-
- // Do any additional setup after loading the view.
- }
- -(UIImageView *)youpaipimgV
- {
- if(!_youpaipimgV)
- {
- _youpaipimgV = [[UIImageView alloc]initWithFrame:CGRectMake((self.vWidth-135)/2, 23, 135, 135)];
- [_youpaipimgV setImage:[UIImage imageNamed:@"vqu_images_finishMsg"]];
- }
- return _youpaipimgV;
- }
- -(UILabel *)youpaiptitleLab
- {
- if(!_youpaiptitleLab)
- {
- _youpaiptitleLab = [[UILabel alloc]init];
- [_youpaiptitleLab setTextColor:HexColorFromRGB(0x2A2935)];
- [_youpaiptitleLab setFont:LCBoldFont(16)];
- _youpaiptitleLab.numberOfLines = 0;
- // _titleLab.lineBreakMode = NSLineBreakByWordWrapping;
- [_youpaiptitleLab setTextAlignment:NSTextAlignmentLeft];
- }
- return _youpaiptitleLab;
- }
- -(UIButton *)youpaipopenBtn
- {
- if(!_youpaipopenBtn)
- {
- _youpaipopenBtn = [[UIButton alloc]init];
- [_youpaipopenBtn.titleLabel setFont:LCBoldFont(15)];
- _youpaipopenBtn.layer.cornerRadius = 8;
- _youpaipopenBtn.layer.masksToBounds = YES;
- [_youpaipopenBtn addTarget:self action:@selector(youpaifcancelWindow) forControlEvents:UIControlEventTouchUpInside];
- [_youpaipopenBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
-
- }
- return _youpaipopenBtn;
- }
- -(void)youpaifcancelWindow
- {
-
- [self dismissViewControllerAnimated:YES completion:nil];
- if (self.youpaipfinishMsgdelegate) {
- [self.youpaipfinishMsgdelegate youpaifjumFinishMsgClick];
- }
-
- }
- /*
- #pragma mark - Navigation
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- // Get the new view controller using [segue destinationViewController].
- // Pass the selected object to the new view controller.
- }
- */
- @end
|