XPQrCode 0.0.1

XPQrCode 0.0.1

Maintained by jamalping.



XPQrCode 0.0.1

  • By
  • jamalping

XPQrCode

CI Status Version License Platform

示例

image.png

Example

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

Requirements

Installation

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

pod 'XPQrCode'

user

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
        }()

Author

jamalping, [email protected]

License

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