Latest 1.0.4
Homepage https://github.com/chenyun122/QRCodeScan
License MIT
Platforms ios 8.0, requires ARC
Authors

QRCodeScan

A simple QR Code scan solution with only system API and smooth animation.

QRCodeScan

Usage

Copy the source code in the /QRCodeScan folder into your project, then use it like UIViewController. Please check details in Demo project.

Create the QRCodeScanViewController and present it:

    QRCodeScanViewController *scanViewController = [[QRCodeScanViewController alloc] init];
    scanViewController.continuous = YES;
    scanViewController.scanInterval = 1.5;
    scanViewController.delegate = self;
    [self presentViewController:scanViewController animated:YES completion:nil];

    //Other customizations
    //scanViewController.scanWindowCornerColor = UIColor.redColor;
    //scanViewController.scanWindowFrame = CGRectMake(100, 100, 100, 100);
    //scanViewController.textAboveScanWindow = @"Scan QRcode";
    //scanViewController.textAboveScanWindowMargin = 20.0;

    //Could be pushed by an UINavigationController
    //[self.navigationController pushViewController:scanViewController animated:YES];

Handle the QRCode scanned:

#pragma mark - QRCodeScanViewControllerDelegate
-(void)QRCodeScanViewController:(QRCodeScanViewController *)qrCodeScanViewController qrCodeDidScanned:(NSString *)qrCode {
    NSLog(@"QRCode Scanned:%@",qrCode);

    //Usually, we dismiss the QRCodeScanViewController after QRCode scanned
    [qrCodeScanViewController dismissViewControllerAnimated:YES completion:nil];
}

Customization

The scan time interval, continuous scanning, scan window corner color and its frame could be customed.


[中文]
这是一个简单轻量的二维码识别方案。它只使用了系统API,具备平滑的动画效果。

使用

拷贝QRCodeScan目录下源代码到您的项目中,就可以像使用UIViewController那样使用它。 可参考Demo项目。
简要代码请参考以上英文介绍。

定制

扫描的时间间隔,是否持续扫描,扫描窗角颜色和位置大小可定制。


License

StepIndicator is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "CYQRCodeScan",
    "version": "1.0.4",
    "summary": "A simple QR Code scan solution",
    "description": "A simple QR Code scan solution with only system API and smooth animation.",
    "homepage": "https://github.com/chenyun122/QRCodeScan",
    "screenshots": "https://github.com/chenyun122/QRCodeScan/raw/master/Screenshots/QRCodeScan.gif?raw=true",
    "license": "MIT",
    "authors": {
        "Yun CHEN": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/chenyun122/QRCodeScan.git",
        "tag": "1.0.4"
    },
    "source_files": [
        "QRCodeScan",
        "QRCodeScan/**/*.{h,m}"
    ],
    "resources": "QRCodeScan/**/*.{xib,nib,storyboard,png}",
    "resource_bundles": {
        "QRCodeScan": [
            "QRCodeScan/**/*.xcassets",
            "QRCodeScan/*.lproj/*"
        ]
    }
}

Pin It on Pinterest

Share This