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).
精彩评论