Skip to content

Customisable QR Code Reader View Controller written in Swift

License

Notifications You must be signed in to change notification settings

diegomarcon/QRCodeController

Repository files navigation

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.

About

Customisable QR Code Reader View Controller written in Swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published