开发者

iOS programming - how to zoom in and zoom out

How do you increase or decrease the size of a UIImageView in Obj-C? For example, I want a picture of duck to grow larger and larger开发者_运维技巧. I can't find anything on this topic.


If you are talking about pint-to-zoom, see Trevor's answer. But if you just want to programmatically increase the display size of the view, just modify the frame property of the UIImageView. If you increase the size of the view, the image will scale to fit.


If your talking about pinch-to-zoom, you must use a UIScrollView. Check out the documentation.

If you're looking to make the image animate from smaller to larger, use a UIView animation block on the UIImageView

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜