How can we prevent the view from going to the previous view after user clicks OK button on camera access prompt? Here is our code:
func RequestCameraAccess() {
AVCaptureDevice.requestAccess(forMediaType: AVMediaTypeVideo, completionHandler: { (granted: Bool) -> Void in
if granted == true {
print("User Granted")
DispatchQueue.main.async {
self.Cam();
}
} else {
print("User Rejected")
DispatchQueue.main.async {
self.image1.isHidden = true
}
}
})
}
Thanks