UIGraphicsImageRenderer
UIGraphicsImageRenderer is a class in Apple's UIKit framework that simplifies the process of drawing graphics into an image. It provides a modern and convenient way to create images from Core Graphics drawing operations, replacing older methods that required more manual setup.
The primary benefit of UIGraphicsImageRenderer is its block-based API. You create an instance of the renderer,
UIGraphicsImageRenderer supports various formats for the output image, including PNG and JPEG. You can also specify