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

时间:2017-03-31 06:48:21

标签: swift3 uiimage uiimagepickercontroller

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

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

enter image description here

1 个答案:

答案 0 :(得分:0)

也许你可以这样做:

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