Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.27 KB

README.md

File metadata and controls

50 lines (35 loc) · 1.27 KB

QRCodeController

Customisable QR Code Reader View Controller written in Swift

Requirements

  • iOS 8.0+

Installation

QRCodeController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'QRCodeController', '~> 0.2'

Usage

Create QRCodeController

let qrCodeController = QRCodeController()

Add callback for decoded strings

qrCodeController.callback = { result in
    print(result)
}

Present it

presentViewController(qrCodeController, animated: true, completion: nil)

Customisable Properties

  • var borderColor: UIColor: Sets detection border color. Default is UIColor.greenColor()
  • var borderWidth: CGFloat: Sets detection border width. Default is 2
  • var vibrate: Bool: Vibrate on code detection. Default is true
  • var closeAfterCapture: Bool: Close controller after first capture. Default is true
  • var suppotedMetadataObjectTypes: [String]: Supported metadata object types. Default is [AVMetadataObjectTypeQRCode]. More AVMetadataObjectType's can be found on AVMetadataObject reference.

Author

Diego Marcon, [email protected]

License

QRCodeController is available under the MIT license. See the LICENSE file for more info.