文章来源:淘论文网   发布者: 毕业设计   浏览量: 32



还可以点击去查询以下关键词:
[EFQRCode]    [extension]    [UIImage]    [create]    [EFQRCode - An extension for UIImage to create and scan QRC]   

项目介绍:

EFQRCode





An extension for UIImage to create and scan QRCode, in Swift.

Overview

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

XCode 8.0+

Swift 3.0+

Installation

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

pod 'EFQRCode', '~> 1.0.0'Use1. Import EFQRCode module where you want to use it:import EFQRCode2. Get QR Codes from UIImage, maybe there are several codes in a image, so it will return an array:if let testImage = UIImage(named: 'test.png') { let codes = testImage.toQRCodeString() if codes.count > 0 { print('There are \(codes.count) codes in testImage.') for (index, code) in codes.enumerated() { print('The content of \(index) QR Code is: \(code).') } } else { print('There is no QR Codes in testImage.') } }

This can be also written as this:

if let testImage = UIImage(named: 'test.png') { let codes = EFQRCode.GetQRCodeString(From: testImage) if codes.count > 0 { print('There are \(codes.count) codes in testImage.') for (index, code) in codes.enumerated() { print('The content of \(index) QR Code is: \(code).') } } else { print('There is no QR Codes in testImage.') } }3. Create QR Code image:// QRCodeString: Content of QR Code // size (Optional): Width and height of image // inputCorrectionLevel (Optional): error-tolerant rate // L 7% // M 15% // Q 25% // H 30% // iconImage (Optional): icon in the middle of QR Code Image // iconImageSize (Optional): Width and height of iconif let tryImage = UIImage(QRCodeString: 'what the hell.', size: 200, inputCorrectionLevel: .m, iconImage: UIImage(named: 'eyrefree'), iconImageSize: 10.0) { print('Create QRCode image success!') } else { print('Create QRCode image failed!') }

This can be also written as this:

if let tryImage = EFQRCode.CreateQRCodeImage(With: 'what the hell.', size: 200, inputCorrectionLevel: .m, iconImage: UIImage(named: 'eyrefree'), iconImageSize: 10.0) { print('Create QRCode image success!') } else { print('Create QRCode image failed!') }Author

EyreFree, eyrefree@eyrefree.org

License

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

GitHub

https://github.com/EyreFree/EFQRCode

开题报告开题报告

这里还有:


还可以点击去查询:
[EFQRCode]    [extension]    [UIImage]    [create]    [EFQRCode - An extension for UIImage to create and scan QRC]   

请扫码加微信 微信号:sj52abcd


下载地址: http://www.taolw.com/down/7687.docx
  • 上一篇:小程序今毕业设计日头条
  • 下一篇:炫酷的菜单弹射动画:SDiffuseMenu(Swift版AwesomeMenu)