It's a simple view controller that you can instantiate to read Barcodes or QRCodes.
let codeReaderVC = CodeReaderViewController().instantiate(delegate: self)
self.present(codeReaderVC, animated: true, completion: nil)
Implementing the CodeReaderDelegate
you will receive objects thats reflect what camera read.
func codeReaderDidCancel()
func codeReaderDidFail(controller: CodeReaderViewController)
func codeReaderDidGetQRCode(controller: CodeReaderViewController, type: CodeReaderType, value: Any?)
func codeReaderDidGetBarcode(controller: CodeReaderViewController, code: String)
- String
- URL
- EKEvent
- CNContact
- CLLocation
- CodeReaderSMS
- CodeReaderMail
Or you can handle this automatically with CodeReaderConfig.handleAutomatically = true