获取网络图片的宽高
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];posted on 2015-07-23 10:43 yucaijiang 阅读(455) 评论(0) 收藏 举报
浙公网安备 33010602011771号