UIImage size in UIImageView

前端 未结 4 484
天涯浪人
天涯浪人 2021-01-06 18:40

I have some UIImage and display it in UIImageView.

I need to use UIViewContentModeScaleAspectFit content mode.

Here i

4条回答
  •  囚心锁ツ
    2021-01-06 18:53

    Its not possible. You can get the original Image size via following method

    UIImage *image = imageView.image;
    CGSize size = image.size;
    

    size

    The dimensions of the image, taking orientation into account. (read-only)

    @property(nonatomic, readonly) CGSize size
    

提交回复
热议问题