about how IOS QR code is created and scanned (Ios,zbar supports 64-bit solutions)

Source: Internet
Author: User

In the course of iOS development, it is sometimes necessary to use QR code scanning and QR code generation, and now introduce my own test and pass method:

(a) Two-dimensional code generation mode:

Need tools: Libqrencode Library, qrcodegenerator.h,qrcodegenerator.m file, to tell the truth, find these two files on the internet really wasted a lot of my kung fu, the following I will put the detailed paste, I believe that will save you a lot of time.

With the above two files you can add it to your project and use the appropriate interface API to complete the function.

Imageview.image = [Qrcodegenerator qrimageforstring:string imageSize:imageview.bounds.size.width];

(ii) Two-dimensional code recognition: there are commonly used Zbar and zxing two ways, about the difference between the two methods and pros and cons believe that we can search Baidu, here is not described.

(1) How to use Zbar:

Download the Zbar SDK and import it into the project, add the appropriate framework to the project, as for the added method, have done iOS development believe all know that Avfoundation.framework,coremedia.framework,corevideo.framework, quartzcore.framework, Libiconv.dylib.

When using Zbar, there is an important problem is that the official is not support 64-bit, so we need to recompile the downloaded file, about how to compile the following there are several good solutions:

http://www.cocoachina.com/bbs/read.php?tid=233263 The original author of this blog has given several solutions, we can refer to, I have only measured the following this way,

http://blog.diogot.com/blog/2013/09/18/static-libs-with-support-to-ios-5-and-arm64/specific recompile static library methods are described in detail in this blog post.

This is my own compilation, has been determined to run on the Iphone6 simulator, specifically: http://pan.baidu.com/s/1nt5lG9r

(2) ZXing (pending study)

about how IOS QR code is created and scanned (Ios,zbar supports 64-bit solutions)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.