Set UIImageView Size in UITableViewCell when UIImage loaded from URL?

前端 未结 3 2052
天命终不由人
天命终不由人 2021-02-03 13:32

Loading images from URL into a uiimage and then adding those images to a uitableviewcell uiimageview, like below code. I do not know the image sizes, but need to force them to

3条回答
  •  深忆病人
    2021-02-03 14:23

    I had the same problem and this worked perfectly for me;

    select the UIImage and go to attributes inspector and check "Clip Subviews"

    make sure you have constraints set for the image's size.

提交回复
热议问题