YOUPAILZVipNobleWindow.m 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //
  2. // YOUPAILZVipNobleWindow.m
  3. // VQU
  4. //
  5. // Created by CY on 2021/8/31.
  6. // Copyright © 2021 MS. All rights reserved.
  7. //
  8. #import "YOUPAILZVipNobleWindow.h"
  9. @interface YOUPAILZVipNobleWindow ()
  10. @end
  11. @implementation YOUPAILZVipNobleWindow
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. self.baseView.hidden = YES;
  15. [self youpaifinitUI];
  16. }
  17. - (void)youpaifinitUI{
  18. UIView *bgV = [[UIView alloc] init];
  19. bgV.backgroundColor = HexColorFromRGB(0x2A2935);
  20. bgV.layer.cornerRadius = 8.0f;
  21. bgV.clipsToBounds = YES;
  22. [self.view addSubview:bgV];
  23. [bgV mas_makeConstraints:^(MASConstraintMaker *make) {
  24. make.left.offset(ScaleSize(32.0f));
  25. make.right.offset(ScaleSize(-32.0f));
  26. make.centerY.equalTo(self.view);
  27. }];
  28. UIImageView *imgV = [[UIImageView alloc] init];
  29. [imgV sd_setImageWithURL:[LCTools getImageUrlWithAddress:self.youpaipimagePath]];
  30. [bgV addSubview:imgV];
  31. [imgV mas_makeConstraints:^(MASConstraintMaker *make) {
  32. make.left.offset(ScaleSize(14.0f));
  33. make.right.offset(ScaleSize(-14.0f));
  34. make.top.offset(ScaleSize(19.0f));
  35. make.height.offset(ScaleSize(self.youpaipimageHeight));
  36. }];
  37. UIButton *confimBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  38. confimBtn.backgroundColor = [UIColor colorWithPatternImage:[LCTools ColorImage:CGSizeMake(KScreenWidth - ScaleSize(120.0f), 48.0f) FromColors:@[HexColorFromRGB(0xFBD893),HexColorFromRGB(0xD66F47)] ByGradientType:GradientTopToBottom]];
  39. confimBtn.layer.cornerRadius = 24.0f;
  40. confimBtn.clipsToBounds = YES;
  41. [confimBtn setTitleColor:HexColorFromRGB(0x75170A) forState:UIControlStateNormal];
  42. confimBtn.titleLabel.font = LCFont(17.0f);
  43. [confimBtn setTitle:@"好的" forState:UIControlStateNormal];
  44. [confimBtn addTarget:self action:@selector(youpaifconfimBtnClick) forControlEvents:UIControlEventTouchUpInside];
  45. [bgV addSubview:confimBtn];
  46. [confimBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  47. make.top.equalTo(imgV.mas_bottom).offset(ScaleSize(20.0f));
  48. make.centerX.equalTo(bgV);
  49. make.size.mas_offset(CGSizeMake(KScreenWidth - ScaleSize(120.0f), 48.0f));
  50. make.bottom.offset(ScaleSize(-20.0f));
  51. }];
  52. }
  53. - (void)youpaifconfimBtnClick{
  54. [self dismissViewControllerAnimated:YES completion:^{}];
  55. }
  56. @end