在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):EFPrefix/EFQRCode开源软件地址(OpenSource Url):https://github.com/EFPrefix/EFQRCode开源编程语言(OpenSource Language):Swift 91.8%开源软件介绍(OpenSource Introduction):EFQRCode is a lightweight, pure-Swift library for generating stylized QRCode images with watermark or icon, and for recognizing QRCode from images, inspired by qrcode. Based on ExamplesDemo ProjectsTestFlightYou can click the App StoreYou can click the You can also click the You can also purchase the professional version of our product based on this library from the App Store by clicking on the App Store button below, support iOS: Compile Demo ManuallyTo run the example project manually, clone the repo, demos are in the 'Examples' folder, remember run command Or you can run the following command in terminal: git clone [email protected]:EFPrefix/EFQRCode.git; cd EFQRCode; sh Startup.sh; open 'EFQRCode.xcworkspace' RequirementsInstallationCocoaPodsEFQRCode is available through CocoaPods. To install it, simply add the following line to your Podfile: pod 'EFQRCode', '~> 6.2.1' Then, run the following command: $ pod install Carthage
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. You can install Carthage with Homebrew using the following command: $ brew update
$ brew install carthage To integrate EFQRCode into your Xcode project using Carthage, specify it in your
Run Swift Package ManagerThe Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the Swift compiler. Once you have your Swift package set up, adding EFQRCode as a dependency is as easy as adding it to the dependencies: [
.package(url: "https://github.com/EFPrefix/EFQRCode.git", .upToNextMinor(from: "6.2.1"))
] Quick Start1. Import EFQRCodeImport EFQRCode module where you want to use it: import EFQRCode 2. RecognitionA String Array is returned as there might be several QR Codes in a single if let testImage = UIImage(named: "test.png")?.cgImage {
let codes = EFQRCode.recognize(testImage)
if !codes.isEmpty {
print("There are \(codes.count) codes")
for (index, code) in codes.enumerated() {
print("The content of QR Code \(index) is \(code).")
}
} else {
print("There is no QR Codes in testImage.")
}
} 3. GenerationCreate QR Code image, basic usage:
if let image = EFQRCode.generate(
for: "https://github.com/EFPrefix/EFQRCode",
watermark: UIImage(named: "WWF")?.cgImage
) {
print("Create QRCode image success \(image)")
} else {
print("Create QRCode image failed!")
} Result: 4. Generation from GIFUse
if let qrCodeData = EFQRCode.generateGIF(
using: generator, withWatermarkGIF: data
) {
print("Create QRCode image success.")
} else {
print("Create QRCode image failed!")
} You can get more information from the demo, result will like this: 5. NextLearn more from User Guide. Recommendations
PS of PS: I wish you can click the Other Platforms/Languages
ContributorsThis project exists thanks to all the people who contribute. [Contribute] PS: We use QRCodeSwift to generate QR code on watchOS, thanks to ApolloZhu. DonationsIf you think this project has brought you help, you can buy me a cup of coffee. If you like this project and are willing to provide further support for it's development, you can choose to become BackersThank you to all our backers! |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论