开发者

How can I zoom an image in my iPhone application?

开发者 https://www.devze.com 2022-12-25 13:33 出处:网络
I had an image in image in my iPhone application.The text in the image is not readable as开发者_开发知识库 it is very small.How can I zoom it at run time?

I had an image in image in my iPhone application. The text in the image is not readable as开发者_开发知识库 it is very small. How can I zoom it at run time?

Anyone please help..


imageview.frame = CGRectMake(imageview.frame.origin.x, (imageview.frame.origin.y), imageview.frame.size.width + 20, imageview.frame.size.height + 20);

OR

imageview.transform = CGAffineTransformMakeScale(1.05, 1.05);


You can place the image on a ImageView , which is added to the ScrollView. And then you can use the scroll view delegate method

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView

for zooming and scrolling.

0

精彩评论

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

关注公众号