I want to take a screenshot that is 375x375 pixels wide, but I don't want it to start at (0, 0) in the top left of the screen, I want it to start at (0, 64). How can I accomplish this?
Here is my function:
func screenShotMethod() {
let size = CGSize(width: 375, height: 375)
UIGraphicsBeginImageContextWithOptions((size), false, 0.0)
view.layer.render(in: UIGraphicsGetCurrentContext()!)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
UIImageWriteToSavedPhotosAlbum(image!, nil, nil, nil)
}