This is a small and configurable QRCode scanner with Animation.
- Change animation
Add "CDZQRScanView" files to your project
Add pod 'CDZQRScanView'
in your Podfile
#import "CDZQRScanView.h"
First,Init the view, set the delegate ,and config if you want.
- (CDZQRScanView *)scanView{
if (!_scanView) {
_scanView = [[CDZQRScanView alloc]initWithFrame:self.view.bounds];
_scanView.delegate = self;
_scanView.showBorderLine = YES;
_scanView.scanRect = ...
...
}
return _scanView;
}
And Than,add the view and start.
[self.view addSubview:self.scanView];
[self.scanView startScanning];
At last,,deal the result in delegate.
- (void)scanView:(CDZQRScanView *)scanView pickUpMessage:(NSString *)message{
//do some thing you want,for example
[scanView stopScanning];
[self showAlert:message action:^{
[scanView startScanning];
}];
}
iOS 8.0 Above
- Open a issue
- QQ:757765420
- Email:[email protected]
- Weibo:@Nemocdz
CDZQRScanView is available under the MIT license. See the LICENSE file for more info.