appcoda/TextDetection

Swift Compiler Error in ViewController

leeprobert opened this issue · 1 comments

In this line on 157:
let imageRequestHandler = VNImageRequestHandler(cvPixelBuffer: pixelBuffer, orientation: 6, options: requestOptions)

The int '6' should be expected argument type CGImagePropertyOrientation

The int '6' should be modified to be:

let imageRequestHandler = VNImageRequestHandler(cvPixelBuffer: pixelBuffer, orientation: CGImagePropertyOrientation(rawValue: 6)!, options: requestOptions)