12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- //
- // JXActiveDetailVc.m
- // shiku_im
- //
- // Created by 123 on 2020/6/3.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import "JXActiveDetailVc.h"
- @interface JXActiveDetailVc ()
- @end
- @implementation JXActiveDetailVc
- - (void)gobackBt{
-
- [g_navigation dismissViewController:self animated:YES];
- }
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self defineNavBarXXX:@"活动详情" andRinghtBtnImg:@""];
-
- UIScrollView *imageScrollView =[[UIScrollView alloc]init];
- imageScrollView.backgroundColor=kRGBColor(145, 29, 19);
- [self.view addSubview:imageScrollView];
- [imageScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.mas_equalTo(JX_SCREEN_TOP);
- make.left.mas_equalTo(0);
- make.right.mas_equalTo(0);
- make.bottom.mas_equalTo(0);
- }];
-
- UIImageView *imageBackV=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"背景+装饰"]];
- imageBackV.userInteractionEnabled=YES;
- imageBackV.contentMode=UIViewContentModeScaleAspectFill;
- [imageScrollView addSubview:imageBackV];
- CGFloat imageYW = CGImageGetWidth(imageBackV.image.CGImage);
- // iamgeView的H = imageView的宽 / (原始图片的宽 / 原始图片的高)---根据宽高比得出imageView的宽
- CGFloat imageH = JX_SCREEN_WIDTH / (imageYW / CGImageGetHeight(imageBackV.image.CGImage));
- imageBackV.frame = CGRectMake(0, 0, JX_SCREEN_WIDTH, imageH);
-
- //活动规则介绍图片
- UIImageView *bottomIMG=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"bottomIMG"]];
- [imageBackV addSubview:bottomIMG];
- CGFloat imageBYW = CGImageGetWidth(bottomIMG.image.CGImage);
- // iamgeView的H = imageView的宽 / (原始图片的宽 / 原始图片的高)---根据宽高比得出imageView的宽
- CGFloat imageBH = JX_SCREEN_WIDTH-92 / (imageBYW / CGImageGetHeight(bottomIMG.image.CGImage));
- bottomIMG.frame = CGRectMake(46, 111+40, JX_SCREEN_WIDTH-92, imageBH);
- // imageScrollView.contentSize=CGSizeMake(0, CGRectGetMaxY(imageBackV.frame));
- }
- /*
- #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
|