zoukankan      html  css  js  c++  java
  • 获取网络图片的宽高

    headerImageView.contentMode = UIViewContentModeScaleAspectFit;

    [headerScrollView addSubview:headerImageView];
     
    int imgWidth = headerImageView.image.size.width;
                    int imgHight = headerImageView.image.size.height;
                     
                    int aWidth = headerImageView.image.size.width/headerImageView.frame.size.width;
                     
                    int LastWidth = imgWidth/aWidth;
                    int LastHight = imgHight/aWidth;
     
    //视频暂停图片
                    UIImageView *imageee = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-100)/2, (SCREEN_HEIGHT-100)/2, 370/2, 310/2)];
                    imageee.image = LOAD_IMAGE(@"newhouse_mov_stop");
                    imageee.center = headerImageView.center;
                    [headerScrollView addSubview:imageee];
                     
                    UIButton *movbtn = [[UIButton alloc] initWithFrame:CGRectMake(0+i*SCREEN_WIDTH, 0, LastWidth, LastHight)];
                    movbtn.backgroundColor = [UIColor clearColor];
                    movbtn.tag = 400+i;
                    [movbtn addTarget:self action:@selector(doBoFang:) forControlEvents:UIControlEventTouchUpInside];
                    movbtn.center = headerImageView.center;
                    [headerScrollView addSubview:movbtn];
  • 相关阅读:
    Android数据存储之Application
    contentOffset、contentSize和contentInset
    block
    IOS中的深拷贝和浅拷贝
    手势图的设计原理(2)拖拽、捏合、轻扫、旋转
    深浅拷贝的应用-copy、mutableCopy
    手势图的设计原理(1)建立、开始、移动、结束、点击、长按
    UIView
    MVC-Model
    UIPageControl页面控制的控件
  • 原文地址:https://www.cnblogs.com/-ios/p/4669737.html
Copyright © 2011-2022 走看看