let videoInput=AVCaptureDeviceInput.deviceInputWithDevice(self.videoDevice, error:nil)!
Extra argument 'error' in call
with the above code
What is the cause of the error?
Swift introduced do~try~catch
as a new syntax for error handling from version 2.
The sled changed the NSError pointer as an argument to use try
.
The reason for the error is that there is no last error
argument already in this method, but you are trying to call it with an argument.
Therefore, the Extra argument, extra argument error appears.
© 2024 OneMinuteCode. All rights reserved.