SwiftUI Image
has an initializer to init an Image
instance with an UIImage
instance via init(uiImage: UIImage)
. Is there a way to convert the Image instance back to UIImage
type?
I found a similar question in How to convert a image to UIImage but it does not answer my question. The motivation is that I need to save the Image to photo album via UIImageWriteToSavedPhotosAlbum(_:_:_:_:)
Obviously we can have another variable to hold the data source, the original UIImage
, but I just wonder if that is really necessary.