/CodeReader

Simple image reader (single view controller) to Barcode and QRCode objects.

Primary LanguageSwiftMIT LicenseMIT

cover

It's a simple view controller that you can instantiate to read Barcodes or QRCodes.

How to use

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)

Possible responses

  • String
  • URL
  • EKEvent
  • CNContact
  • CLLocation
  • CodeReaderSMS
  • CodeReaderMail

Or you can handle this automatically with CodeReaderConfig.handleAutomatically = true

In action

cover     cover