开发者

to stretch the image within the imageView in response to a UISlider

i have placed a image in a imageView in viewController's view in a view based project. i used IBoutlet to create a imageView and pasted a image in it .similarly i placed a UISlider too. my image is something like a room window with horizontal bars.the distance btn the bars is very minute. My requirement is "as i move the UISlider the image should get zoomed in the centre so that开发者_开发技巧 the gap between the bars gets maximized. At the end of the slide the image should be visible with only one or two horizontal bars"

can someone help me in this regard. if there is a column to upload a file i could have uploaded the image which would help in understanding my requirement. But i could not do it.

so kindly try to an extent as much possible. thank you


You must use an UIScrollView and what you need is - (void)zoomToRect:(CGRect)rect animated:(BOOL)animated

From apple's docs

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜