开发者

How to auto-scale UIImage size in UIImageView?

As I try to put UIImage into a UIImageView, UIImageView auto-expended to display real image size. Is there a solution to have image开发者_运维问答 auto-scale according to UIImageView's size.


You can do that either in IB or in your code directly be setting UIImageView's contentMode property to UIViewContentModeScaleAspectFit (see UIView class documentation for other possible values of UIViewContentMode enumeration).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜