Skip to content

Dwarven/QRCode-Decoder

Repository files navigation

QRCode-Decoder

CocoaPods Compatible Platform Twitter License Carthage compatible

An iOS QRCode Scanner and Decoder

Preview

Podfile

To integrate QRCode-Decoder into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'DYQRCodeDecoder'

How to use

#import "DYQRCodeDecoderViewController.h"

DYQRCodeDecoderViewController *vc = [[DYQRCodeDecoderViewController alloc] initWithCompletion:^(BOOL succeeded, NSString *result) {
    if (succeeded) {
        NSLog(@"%@", result);
    } else {
        NSLog(@"failed");
    }
}];
[vc setTitle:@"string"];
[vc setNeedsScanAnnimation:YES or NO];

[[vc leftBarButtonItem] setImage:[UIImage imageNamed:@"your image name"]];
[[vc rightBarButtonItem] setImage:[UIImage imageNamed:@"your image name"]];
//or
[[vc leftBarButtonItem] setTitle:@"string"];
[[vc leftBarButtonItem] setTitle:@"string"];

[vc setNavigationBarTintColor:[UIColor lightGrayColor]];

[vc setFrameImage:[UIImage imageNamed:@"your image name"]];
[vc setLineImage:[UIImage imageNamed:@"your image name"]];

UINavigationController *navVC = [[UINavigationController alloc] initWithRootViewController:vc];
[self presentViewController:navVC animated:YES completion:NULL];

Enjoy