UIGraphicsImageRenderer and UIGraphicsBeginImageContext: What is useful for UIImage.draw(in: CGRect)

154 Views Asked by At

I am newbie in swift and wanted to use UIImage.draw(in: CGRect) in my application to resize image. When I used UIGraphicsImageRenderer, it made some memory spikes rather than using UIGraphicsBeginImageContext. Since Apple discourages using UIGraphicsBeginImageContext in spite of UIGraphicsImageRenderer, how can I remove the memory spikes?

0

There are 0 best solutions below