• 获取网络图片的宽高


    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];
  • 相关阅读:
    浅谈组装主机的一些注意问题2
    浅谈组装主机的一些注意问题1
    浅谈组装主机的一些注意问题
    openGL中的原理理解1---一个视图需要支持OGL需要配置,GLenbalView的理解
    OpenGL中常用的函数
    MFC中的DLL、LIb文件的创建、使用
    MFC中的多线程
    MFC中的一般经验之谈5
    算法时间复杂度和NP问题简介
    如何搜索高质量论文
  • 原文地址:https://www.cnblogs.com/-ios/p/4669737.html
Copyright © 2020-2023  润新知