ios - 有没有办法在iOS上生成二维码图片

标签 ios qr-code

是否有一种标准方法可以生成 QR 码并将其附加到来自 iOS 客户端应用程序的邮件项目(无服务器代码)?

最佳答案

从 iOS 7 开始,您可以使用 Core Image 滤镜来生成 QR 图像。参见 the final tip here :

- (CIImage *)createQRForString:(NSString *)qrString {
    NSData *stringData = [qrString dataUsingEncoding: NSISOLatin1StringEncoding];

    CIFilter *qrFilter = [CIFilter filterWithName:@"CIQRCodeGenerator"];
    [qrFilter setValue:stringData forKey:@"inputMessage"];

    return qrFilter.outputImage;
}

关于ios - 有没有办法在iOS上生成二维码图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12051118/

相关文章:

ios守护进程背景

ios - iPad 项目 "save as"的正确方法是什么?

ios - 找不到匹配的配置文件(有效的配置文件均不允许指定的权利)

iphone - iPhone 的录音格式?

ios - UIImage 不保存

android - 从 Android ZXing IntentIntegrator 中提取结果

ios - 拒绝问题 : "We are not able to continue because we need a demo QR code or AR marker (image) to fully assess your app features."

iphone - Objective-C : is it possible to detect QR code data type?

ios - 如何生成类似于 Snapchat 的 Snapcode 并以相同方式使用的图像?

cordova - Ionic cordova - 二维码生成示例