YOUPAIZYFirstRechargeWindow.m 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. //
  2. // YOUPAIZYFirstRechargeWindow.m
  3. // VQU
  4. //
  5. // Created by 肖浩然的mac on 2021/9/9.
  6. // Copyright © 2021 MS. All rights reserved.
  7. //
  8. #import "YOUPAIZYFirstRechargeWindow.h"
  9. @interface YOUPAIZYFirstRechargeWindow ()
  10. @end
  11. @implementation YOUPAIZYFirstRechargeWindow
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. // [self.view setFrame:CGRectMake(0, 0, _vWith, _vHeight)];
  15. // CAShapeLayer *maskLayer = [CAShapeLayer layer];
  16. // UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:self.view.bounds cornerRadius:25];
  17. // maskLayer.path = path.CGPath;
  18. // self.view.layer.mask = maskLayer;
  19. // [self.view setBackgroundColor:[UIColor whiteColor]];
  20. self.baseView.backgroundColor = [UIColor clearColor];
  21. _youpaipimgV = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.vWidth,self.vHeight)];
  22. _youpaipimgV.layer.cornerRadius = 25;
  23. _youpaipimgV.contentMode = UIViewContentModeScaleAspectFill;
  24. _youpaipimgV.layer.masksToBounds = YES;
  25. [_youpaipimgV sd_setImageWithURL:[LCTools getImageUrlWithAddress:_youpaipimageurl]];
  26. [self.baseView addSubview:self.youpaipimgV];
  27. _youpaipimgV.userInteractionEnabled = YES;
  28. UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(youpaifclickImgAction)];
  29. [_youpaipimgV addGestureRecognizer:tap];
  30. UIImageView *closeImage = [UIImageView new];
  31. [_youpaipimgV addSubview:closeImage];
  32. [closeImage mas_makeConstraints:^(MASConstraintMaker *make) {
  33. make.right.mas_equalTo(-10);
  34. make.top.mas_equalTo(5);
  35. make.size.mas_equalTo(CGSizeMake(32, 32));
  36. }];
  37. closeImage.image = [UIImage imageNamed:@"vqu_images_H_home_re_close"];
  38. closeImage.userInteractionEnabled = YES;
  39. UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(youpaifcloseImageClick)];
  40. [closeImage addGestureRecognizer:tap1];
  41. self.closeImage = closeImage;
  42. // //title
  43. // UIView *titleBgView = [UIView new];
  44. // [_imgV addSubview:titleBgView];
  45. // [titleBgView mas_makeConstraints:^(MASConstraintMaker *make) {
  46. // make.top.mas_equalTo(37);
  47. // make.centerX.mas_equalTo(0);
  48. // make.left.mas_equalTo(49.5);
  49. // make.width.mas_equalTo(self.vWidth-99);
  50. // make.height.mas_equalTo(20);
  51. // }];
  52. // titleBgView.backgroundColor = HexColorFromRGB(0x00A6C0);
  53. // titleBgView.layer.cornerRadius = 10;
  54. // titleBgView.layer.masksToBounds = YES;
  55. //
  56. // UILabel *titleLabel = [UILabel new];
  57. // [titleBgView addSubview:titleLabel];
  58. // [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  59. // make.center.mas_equalTo(0);
  60. // }];
  61. // titleLabel.font = [UIFont systemFontOfSize:12];
  62. // titleLabel.textColor = HexColorFromRGB(0xC3C3C3);
  63. // titleLabel.text = @"这个月你已经打卡8天!";
  64. // //领糖豆
  65. // UIImageView *contentBgView = [UIImageView new];
  66. // [_imgV addSubview:contentBgView];
  67. // [contentBgView mas_makeConstraints:^(MASConstraintMaker *make) {
  68. // make.top.mas_equalTo(titleLabel.mas_bottom).offset(158);
  69. // make.centerX.mas_equalTo(0);
  70. // make.width.mas_equalTo(ScaleSize(115));
  71. // make.height.mas_equalTo(20);
  72. // }];
  73. //
  74. //
  75. // [contentBgView setImage:[LCTools ColorImage:CGSizeMake(ScaleSize(115), 20) FromColors:@[HexColorFromRGB(0x01B676),HexColorFromRGB(0x039872)] ByGradientType:1]];
  76. // contentBgView.layer.cornerRadius = 10;
  77. // contentBgView.layer.masksToBounds = YES;
  78. //
  79. // UILabel *contentLabel = [UILabel new];
  80. // [contentBgView addSubview:contentLabel];
  81. // [contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  82. // make.center.mas_equalTo(0);
  83. // }];
  84. // contentLabel.font = [UIFont systemFontOfSize:12];
  85. // contentLabel.textColor = HexColorFromRGB(0xffffff);
  86. // contentLabel.text = @"+20萌豆";
  87. }
  88. -(void)youpaifcloseImageClick{
  89. [self dismissViewControllerAnimated:YES completion:nil];
  90. }
  91. -(void)youpaifclickImgAction
  92. {
  93. [self.youpaipdelegate youpaifLZFirstRechargeClickAdverImage:self.youpaiplink_type andUrl:self.youpaiplink_url];
  94. [self dismissViewControllerAnimated:YES completion:nil];
  95. }
  96. @end