you need the set output.connection(with: .video)?.videoOrientation before capture image
if let orientation = AVCaptureVideoOrientation(rawValue: UIDevice.current.orientation.rawValue) {
camera.output.connection(with: .video)?.videoOrientation = orientation
}
Post
Replies
Boosts
Views
Activity
Check is your object's name is typed correctly, or have a space in front of the object's name. it works for me.