changed delegate method name to 'didFailWithErrorCode'

This commit is contained in:
Benjamin Sauer 2018-01-10 16:25:40 +01:00
parent 1c34da8db9
commit 65193acf1c
3 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@
}
}
- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didScanBarcodeWithErrorCode:(NSString *)errorCode {
- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didFailWithErrorCode:(NSString *)errorCode {
if (self.result){
self.result([FlutterError errorWithCode:errorCode
message:nil

View File

@ -38,7 +38,7 @@
if (success) {
[self startScan];
} else {
[self.delegate barcodeScannerViewController:self didScanBarcodeWithErrorCode:@"PERMISSION_NOT_GRANTED"];
[self.delegate barcodeScannerViewController:self didFailWithErrorCode:@"PERMISSION_NOT_GRANTED"];
[self dismissViewControllerAnimated:NO completion:nil];
}
}];

View File

@ -9,6 +9,6 @@
@protocol BarcodeScannerViewControllerDelegate <NSObject>
- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didScanBarcodeWithResult:(NSString *)result;
- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didScanBarcodeWithErrorCode:(NSString *)errorCode;
- (void)barcodeScannerViewController:(BarcodeScannerViewController *)controller didFailWithErrorCode:(NSString *)errorCode;
@end