Latest 1.0.0
Homepage https://github.com/wolfcon/FCQRCodeScanner
License MIT
Platforms ios , requires ARC
Authors

Build Status

Simple QRcode Scanner & Generator(Apple API)

Support platform

iOS 7.0 for common function.

iOS 8.0 for local picture decode.[And device limitation: iPhone 5S above device support this function(include 5S)]

Installation

  • Drag FCQRCodeScanner folder to your project.

  • (not available now)CocoaPod:

    add pod 'FCQRCodeScanner', '~>1.0.0'

Usage

Scan

  • Import header:

    #import "FCQRCodeScanner.h"
  • Initialization:

    FCQRCodeScanner *scanner = [FCQRCodeScanner scannerWithFrame:self.view.frame
                                  completion:^(NSString *codeString, FCQRCodeScanner *instance) {
                                    // Do something when get a code
                                        // you can do continue scan by [instance startReading];
                                        // or you can use code and close scan view by [instance close];
                                  }
                                  dismissedAction:^(FCQRCodeScanner *instance) {
                                    // Do something after scan view exit
                                        // Close button clicked event will trigger this block
                                        // For example [instance.view removeFromSuperview];
                                  }];
  • Add the scan view:

    [self.view addSubview:scanner.view];
    // or you can use any other way
    // present or transition
  • Close the scan view:

    [scanner close]; // this function will trigger dismissedAction block.

Generate

  • Import header:

    #import "NSString+FCQRCodeGenerator.h"
  • Generate:

    // string is what you wanna generate from
    // image is QRCode Avatar that you wanna add
    UIImage *myQRCodeImage = [string qRImageWithSize:200]; 
    // or
    UIImage *myQRCodeImageWithAvatar = [string qRImageWithSize:200 avatar:image];

Decode a QRImage from local storage.

  • Import header:

    import "UIImage+Decode.h"
  • Decode:
    // image is what you wanna decode from local storage.
    NSString *codeString = [image decodeWithQRCodeType];
    // iPhone 5S above device support this function(include 5S)

License

Under the MIT License.

Latest podspec

{
    "name": "FCQRCodeScanner",
    "version": "1.0.0",
    "license": "MIT",
    "summary": "Simple QRcode Scanner(Apple API) & Generator",
    "homepage": "https://github.com/wolfcon/FCQRCodeScanner",
    "authors": {
        "Frank": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jprothwell/FCQRCodeScanner.git",
        "tag": "1.0.0"
    },
    "description": "Simple QRcode Scanner(Apple API) & Generator",
    "platforms": {
        "ios": null
    },
    "source_files": "FCQRCodeScanner/*.{h,m}",
    "resources": "FCQRCodeScanner/*.{png,mp3,xib}",
    "requires_arc": true
}

Pin It on Pinterest

Share This