In my project i used AVPlayerViewController in an embedded view.And allow user to draw on the video.To take a screenshot i used the below code...
UIGraphicsBeginImageContextWithOptions(UIScreen.mainScreen().bounds.size, false, 0);
self.view.drawViewHierarchyInRect(view.bounds, afterScreenUpdates: true)
var image:UIImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
The problem is when i run the above code in simulator it works well but in Physical device it returns black image
Any suggestion would be helpful