QuickResponseCode
is a tiny Quick Response Code (QRCode) library for iOS written in Swift.
- iOS 8.0+
- tvOS 9.0+
- Xcode 9 with Swift 4
use_frameworks!
pod 'QuickResponseCode'
You are welcome to fork and submit pull requests.
QuickResponseCode
is open-sourced software, licensed under the MIT
license.
import QuickResponseCode
func generate() {
let qr = QRCode(string: textView.text,
size: imageView.bounds.size,
foreground: UIColor.random,
background: UIColor.random,
correction: .low)
let iconedimage = qr.iconedImage(#imageLiteral(resourceName: "icon"))
let image = qr.image
}
func generate2() {
let image = UIImage.QRCodeImage(from: textView.text,
size: imageView.bounds.size,
foreground: UIColor.random,
background: UIColor.random,
correction: .low)
}
func generate3() {
let image = "SourceString".QRCodeImage(size: imageView.bounds.size,
foreground: UIColor.random,
background: UIColor.random,
correction: .low)
}