生成彩色QR码 [英] Generate colorful QR code

查看:155
本文介绍了生成彩色QR码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想生成彩色QR码。
我曾使用 https://github.com/kuapay/iOS-QR-Code-Generator生成QR码的代码。
现在生成的qr代码总是n黑色。我想用红色或任何
其他颜色。
着色编码和QR码.png图像的绘制完成QR_Draw_png.mm文件。
我应该在 QR_Draw_png中编辑什么。 mm 这个文件。
如何生成彩色二维码。

I want to generate the colorful QR code. I had used https://github.com/kuapay/iOS-QR-Code-Generator code to generate the QR code. now the qr code generated is always n black color.I want to make it in Red or any other color. The coding of coloring And the drawing of QR code .png image is done QR_Draw_png.mm file. What should i edit in QR_Draw_png.mm this file. How to do the generate the colorful qr code.

怎么可能。

请帮助我。

推荐答案

这是生成彩色QR码的最佳示例。

This is the best example to generate colorful QR code.

http: //www.oscarsanderson.com/2013/08/12/implementing-a-qr-code-generator-on-the-iphone/

你将从上面的链接和UIImage的类别找到qrencode库。

You will found qrencode library from above link, and Category of UIImage.

在你需要用你选择的颜色简单地调用这个方法来生成它。

After you need to simple call this method with your selected Color to generate it.

mgView.image = [UIImage QRCodeGenerator:txtCouponName.text
                          andLightColour:[UIColor whiteColor]
                           andDarkColour:[UIColor blackColor]
                            andQuietZone:1
                                 andSize:300];

这篇关于生成彩色QR码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆