获取网络图片的宽高
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-
1
0
0
)/
2
, (SCREEN_HEIGHT-
1
0
0
)/
2
,
3
7
0
/
2
,
3
1
0
/
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
=
4
0
0
+i;
[movbtn
addTarget
:
self
action
:
@selector
(doBoFang:)
forControlEvents
:UIControlEventTouchUpInside];
movbtn
.center
= headerImageView
.center
;
[headerScrollView
addSubview
:movbtn];
posted on 2015-07-23 10:43 yucaijiang 阅读(434) 评论(0) 编辑 收藏 举报