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?
UIGraphicsImageRenderer and UIGraphicsBeginImageContext: What is useful for UIImage.draw(in: CGRect)
Asked
Active
Viewed 86 times
3
-
Please review [ask]. You need to provide example code showing what you are doing, as well as explaining how you are profiling it to determine "memory spikes." – DonMag Feb 10 '23 at 20:36