Запускается ZBAR сканнер в iOS версии приложения
This commit is contained in:
@@ -1,12 +1,29 @@
|
||||
#include "AppDelegate.h"
|
||||
#include "GeneratedPluginRegistrant.h"
|
||||
#import "Runner-Swift.h"
|
||||
#import "ZBarSDK.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
[GeneratedPluginRegistrant registerWithRegistry:self];
|
||||
// Override point for customization after application launch.
|
||||
return [super application:application didFinishLaunchingWithOptions:launchOptions];
|
||||
|
||||
[GeneratedPluginRegistrant registerWithRegistry:self];
|
||||
|
||||
FlutterViewController* controller = (FlutterViewController*)self.window.rootViewController;
|
||||
|
||||
FlutterMethodChannel* scannerChannel = [FlutterMethodChannel
|
||||
methodChannelWithName:@"com.yourcompany.checker/scanner"
|
||||
binaryMessenger:controller];
|
||||
|
||||
[scannerChannel setMethodCallHandler:^(FlutterMethodCall* call, FlutterResult result) {
|
||||
ScannerViewController *modalViewController = [ScannerViewController new];
|
||||
[controller presentViewController:modalViewController animated:YES completion:nil]; }];
|
||||
|
||||
return [super application:application didFinishLaunchingWithOptions:launchOptions];
|
||||
}
|
||||
|
||||
- (void) showScanner {
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user