Code Monkey home page Code Monkey logo

qrio's Introduction

This library has been deprecated and the repo has been archived.

The code is still here and you can still clone it, however the library will not receive any more updates or support.

QRIO

Lightweight framework for QR scanning and generation

๐Ÿ“ Requirements

  • iOS 9.0+

๐Ÿ“ฆ Installation

Carthage

github "nodes-ios/QRIO"

Cocoa Pods

pod "QRIO"

๐Ÿ’ป Usage

Creating a QR Code:

It's as easy as

let image = UIImage.QRImageFrom(string: "Hello World!")

This will return a UIImage:

HelloWorldQR

You can also adjust the size of the generated image, which will give you a clearer image, and the correction level, which adds more error protection, by using the optional parameters:

let image = UIImage.QRImageFrom(string: "Hello World!",
				containingViewSize: imageView.bounds.size,
				correctionLevel: "M")

HelloWorldQR

Scanning a QR Code:

You will need to create an instance of QRIO and maintain a strong reference to it:

let qrio = QRInput()

func scanForQR() {
	qrio.scanForQRImage() { (string) in
		print(string) // Prints "Hello World!" when using the QR codes above
	}
}

You can optionally pass a view to display the preview video in, and also a rect of interest to focus the detection.

let qrio = QRInput()

func scanForQR() {
	qrio.scanForQRImage(previewIn: previewContainer, rectOfInterest: hotspotView.frame) { (string) in
		print(string) // Prints "Hello World!" when using the QR codes above
	}
}

And that's it! If you need to end QR scanning, you can call finish() on your QRIO object.

๐Ÿ‘ฅ Credits

Made with โค๏ธ at Nodes.

๐Ÿ“„ License

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

qrio's People

Contributors

bucekjiri avatar chiliec avatar chriscombs avatar mariusc avatar mike011 avatar thomasminshull avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qrio's Issues

Remove force unwraps

A lot of forced unwrapping going on due to the Objective-C to Swift translation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.