mirror of
https://github.com/simplezhli/flutter_barcode_reader.git
synced 2024-11-23 08:29:22 +08:00
changed delegate method name to 'didFailWithErrorCode'
This commit is contained in:
parent
1c34da8db9
commit
65193acf1c
@ -32,7 +32,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didScanBarcodeWithErrorCode:(NSString *)errorCode {
|
- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didFailWithErrorCode:(NSString *)errorCode {
|
||||||
if (self.result){
|
if (self.result){
|
||||||
self.result([FlutterError errorWithCode:errorCode
|
self.result([FlutterError errorWithCode:errorCode
|
||||||
message:nil
|
message:nil
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
if (success) {
|
if (success) {
|
||||||
[self startScan];
|
[self startScan];
|
||||||
} else {
|
} else {
|
||||||
[self.delegate barcodeScannerViewController:self didScanBarcodeWithErrorCode:@"PERMISSION_NOT_GRANTED"];
|
[self.delegate barcodeScannerViewController:self didFailWithErrorCode:@"PERMISSION_NOT_GRANTED"];
|
||||||
[self dismissViewControllerAnimated:NO completion:nil];
|
[self dismissViewControllerAnimated:NO completion:nil];
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
|
@ -9,6 +9,6 @@
|
|||||||
@protocol BarcodeScannerViewControllerDelegate <NSObject>
|
@protocol BarcodeScannerViewControllerDelegate <NSObject>
|
||||||
|
|
||||||
- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didScanBarcodeWithResult:(NSString *)result;
|
- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didScanBarcodeWithResult:(NSString *)result;
|
||||||
- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didScanBarcodeWithErrorCode:(NSString *)errorCode;
|
- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didFailWithErrorCode:(NSString *)errorCode;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
Reference in New Issue
Block a user