如何在 swift 中使两个 UIImage 大小相同?

How to make two UIImage sizes the same in swift?

我想将 "yellow_noise.png" 的大小与 UIImagePickerController 中 "pickedImage" 的大小相匹配。我应该怎么办?

    originalImageView.image = pickedImage
    overayImageView.image = UIImage(named:"yellow_noise.png")

也许你可以这样做:

let overlayImageView = UIImageView(frame: originalImageView.frame)
overlayImageView.image = UIImage(named:"yellow_noise.png")