#QR framework QR framework provides an easy way to scan and generate QR barcodes.
#How to integrate into a project:
- Drag and drop QR.framework into the project.
- Include QR.framework into the project target’s embedded binaries.
- Import QR into the Swift files as necessary.
#How to QR codes:
- In your storyboard, subclass a new ViewController as QRScannerViewController and set QR as its module.
- In prepareForSegue method, QRScannerViewController's delegate
- Conform to QRScannerViewControllerDelegate protocol to get call backs when a QR code is read or when there is an error. Implement the following methods:
func didScanBarcodeWith(resultString: String)
func didEncounterError(error: NSError)
#How to generate QR codes Use
func createQRFromString(_ str: String, size: CGSize) -> UIImage?
#Requirements:
- iOS 10.0+
- Swift 3.0
- Xcode 8.0