@IBAction func button(sender : AnyObject) {
var videoConnection : AVCaptureConnection!
videoConnection = nil
var connection : AVCaptureConnection
var port : AVCaptureInputPort
var stillImageOutput : AVCaptureStillImageOutput?
for connection in stillImageOutput?.connections{ //this line is where the error is
}
}
I am trying to take a picture with my custom camera and I am getting this error