// // YOUPAILZVipNobleWindow.m // VQU // // Created by CY on 2021/8/31. // Copyright © 2021 MS. All rights reserved. // #import "YOUPAILZVipNobleWindow.h" @interface YOUPAILZVipNobleWindow () @end @implementation YOUPAILZVipNobleWindow - (void)viewDidLoad { [super viewDidLoad]; self.baseView.hidden = YES; [self youpaifinitUI]; } - (void)youpaifinitUI{ UIView *bgV = [[UIView alloc] init]; bgV.backgroundColor = HexColorFromRGB(0x2A2935); bgV.layer.cornerRadius = 8.0f; bgV.clipsToBounds = YES; [self.view addSubview:bgV]; [bgV mas_makeConstraints:^(MASConstraintMaker *make) { make.left.offset(ScaleSize(32.0f)); make.right.offset(ScaleSize(-32.0f)); make.centerY.equalTo(self.view); }]; UIImageView *imgV = [[UIImageView alloc] init]; [imgV sd_setImageWithURL:[LCTools getImageUrlWithAddress:self.youpaipimagePath]]; [bgV addSubview:imgV]; [imgV mas_makeConstraints:^(MASConstraintMaker *make) { make.left.offset(ScaleSize(14.0f)); make.right.offset(ScaleSize(-14.0f)); make.top.offset(ScaleSize(19.0f)); make.height.offset(ScaleSize(self.youpaipimageHeight)); }]; UIButton *confimBtn = [UIButton buttonWithType:UIButtonTypeCustom]; confimBtn.backgroundColor = [UIColor colorWithPatternImage:[LCTools ColorImage:CGSizeMake(KScreenWidth - ScaleSize(120.0f), 48.0f) FromColors:@[HexColorFromRGB(0xFBD893),HexColorFromRGB(0xD66F47)] ByGradientType:GradientTopToBottom]]; confimBtn.layer.cornerRadius = 24.0f; confimBtn.clipsToBounds = YES; [confimBtn setTitleColor:HexColorFromRGB(0x75170A) forState:UIControlStateNormal]; confimBtn.titleLabel.font = LCFont(17.0f); [confimBtn setTitle:@"好的" forState:UIControlStateNormal]; [confimBtn addTarget:self action:@selector(youpaifconfimBtnClick) forControlEvents:UIControlEventTouchUpInside]; [bgV addSubview:confimBtn]; [confimBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(imgV.mas_bottom).offset(ScaleSize(20.0f)); make.centerX.equalTo(bgV); make.size.mas_offset(CGSizeMake(KScreenWidth - ScaleSize(120.0f), 48.0f)); make.bottom.offset(ScaleSize(-20.0f)); }]; } - (void)youpaifconfimBtnClick{ [self dismissViewControllerAnimated:YES completion:^{}]; } @end