0

Using: Swift 3, Xcode 8, IOS

My screenshot works fine, I just need to omit the navigation bar from the image in my camera roll. This is what I have so far:

@IBAction func buttonAction(_ sender: UIButton) {

UIGraphicsBeginImageContextWithOptions(view.bounds.size, false, UIScreen.main.scale)
view.layer.render(in: UIGraphicsGetCurrentContext()!)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()

UIImageWriteToSavedPhotosAlbum(image!, nil, nil, nil)        
}
MontgommeryJR
  • 255
  • 3
  • 18

1 Answers1

0

Simply cropping out the status bar before saving would seem like the ideal solution. Here is another post with someone doing this.

Community
  • 1
  • 1
Natasha
  • 54
  • 6
  • [For some reason I can't print my desired screenshot. I can't print the screenshot but it becomes uncropped once I go to the print option.](http://stackoverflow.com/questions/42261205/how-come-my-cropped-screenshot-becomes-uncropped-when-i-try-to-print-from-the-ca) – MontgommeryJR Feb 15 '17 at 22:26