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];
  • 相关阅读:
    面试题:最小的K个数
    面试题:反转链表
    面试题:二进制中1的个数
    数据结构之二叉树
    Serializable-源码分析
    归并、希尔、快速排序
    栈与队列
    简单排序(冒泡、选择、插入)
    Shiro 框架认证和授权
    mybatis select查询使用返回结果为resultMap
  • 原文地址:https://www.cnblogs.com/-ios/p/4669737.html
Copyright © 2011-2022 走看看