XPQrCode
示例
示例
要运行示例项目,首先克隆仓库,然后在 Example 目录中运行 `pod install`。
需求
安装
XPQrCode 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中。
pod 'XPQrCode'
用户
let imageViewLarge = UIImageView.init(frame: CGRect.init(x: 100, y: 100, width: 100, height: 100))
self.view.addSubview(imageViewLarge)
let imageViewLarge1 = UIImageView.init(frame: CGRect.init(x: 100, y: 400, width: 100, height: 100))
self.view.addSubview(imageViewLarge1)
imageViewLarge.image = {
var qrCode = XPQrCode("http://www.baidu.com")!
qrCode.size = imageViewLarge.bounds.size
qrCode.errorCorrection = .High
return qrCode.insertAvatarImage(codeImage: qrCode.image!, avatarImage: UIImage.init(named: "rage")!)
}()
imageViewLarge1.image = {
var qrCode = XPQrCode("http://www.baidu.com")!
qrCode.size = imageViewLarge.bounds.size
qrCode.errorCorrection = .High
return qrCode.image
}()
作者
jamalping, [email protected]
许可
XPQrCode遵循MIT许可。更多信息请参阅LICENSE文件。