开发者

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

开发者 https://www.devze.com 2023-02-05 06:15 出处:网络
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 so

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

精彩评论

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