Latest 1.1.0
Homepage https://github.com/zhang28602/ZZYQRCode
License MIT
Platforms ios 8.0, requires ARC
Authors

Using the system API (AVFoundation) for packaging, including the UI interface and QR code, barcode scanning, generating and other operations 中文说明

HOW to install

platform :ios, '8.0'
use_frameworks!
pod 'ZZYQRCode', '~> 1.0.0'

How to use

  1. Create sessionManager
- (instancetype)initWithAVCaptureQuality:(AVCaptureQuality)quality
                           AVCaptureType:(AVCaptureType)type
                                scanRect:(CGRect)scanRect
                            successBlock:(SuccessBlock)success;
  1. Show view
- (void)showPreviewLayerInView:(UIView *)view;

Others features

  1. Scan sound effects
@property(assign, nonatomic) BOOL isPlaySound;

@property(copy, nonatomic) NSString *soundName;
  1. Torch
- (void)turnTorch:(BOOL)state;
  1. Scan the QR code in the album
- (void)scanPhotoWith:(UIImage *)image successBlock:(SuccessBlock)success;
  1. Check authorization status
+ (void)checkAuthorizationStatusForCameraWithGrantBlock:(void(^)())grant
                                            DeniedBlock:(void(^)())denied;
  1. Create QR code
UIImage *image = [UIImage createQRCodeWithSize:200 dataString:@"hello"];
  1. Create customize QR code
UIImage *icon = [UIImage imageNamed:@"bigMax"];
UIImage *image = [UIImage createQRCodeWithSize:200
                                    dataString:@"hello"
                               QRCodeImageType:circularImage
                                     iconImage:icon
                                 iconImageSize:40];

Pay attention

Because of iOS10 authorization change,you need to add code in your info.plist

<key>NSCameraUsageDescription</key>
<string></string>
<key>NSPhotoLibraryUsageDescription</key>
<string></string>

Page show

Latest podspec

{
    "name": "ZZYQRCode",
    "version": "1.1.0",
    "license": "MIT",
    "summary": "A Scan QRCode Or BarCode Framework on iOS.",
    "homepage": "https://github.com/zhang28602/ZZYQRCode",
    "authors": {
        "u5f20u6cfdu5b87": "[email protected]"
    },
    "source": {
        "git": "https://github.com/zhang28602/ZZYQRCode.git",
        "tag": "1.1.0"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Demo/Demo/ZZYQRCode/*.{h,m}",
    "resources": "Demo/Demo/ZZYQRCode/ZZYQRCode.bundle"
}

Pin It on Pinterest

Share This