Skip to content

Commit

Permalink
Corrected configuration for vertical container scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirAtAnyline committed Oct 25, 2019
1 parent af2b265 commit d3105a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion example/RNExampleApp/config/VerticalContainerConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ export default {
},
"cutoutConfig": {
"style": "rect",
"maxWidthPercent": "10%",
"alignment": "top_half",
"ratioFromSize": {
"width": 9,
"height": 62
"height": 62
},
"outerColor": "000000",
"outerAlpha": 0.3,
Expand Down
6 changes: 5 additions & 1 deletion plugin/ios/AnylineSDKPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ -(void)initView:(NSString *)scanMode {
self.ocrConfigDict = [dictionary objectForKey:@"ocr"];

dispatch_async(dispatch_get_main_queue(), ^{
self.baseScanViewController.modalPresentationStyle = UIModalPresentationFullScreen;
// self.baseScanViewController.modalPresentationStyle = UIModalPresentationFullScreen;
[[UIApplication sharedApplication] keyWindow].rootViewController.modalPresentationStyle = UIModalPresentationFullScreen;

if ([[scanMode uppercaseString] isEqualToString:[@"scan" uppercaseString]]) {
ALPluginScanViewController *pluginScanViewController =
[[ALPluginScanViewController alloc] initWithLicensekey:self.appKey
Expand All @@ -112,10 +114,12 @@ -(void)initView:(NSString *)scanMode {
}

if(pluginScanViewController != nil){
[pluginScanViewController setModalPresentationStyle: UIModalPresentationFullScreen];
[[[UIApplication sharedApplication] keyWindow].rootViewController presentViewController:pluginScanViewController animated:YES completion:nil];
}
} else {
AnylineBaseScanViewController* baseViewController = [self ViewControllerFromScanMode:scanMode]; //returns nil if ScanMode is not valid
[self.baseScanViewController setModalPresentationStyle: UIModalPresentationFullScreen];
if(baseViewController != nil){
self.baseScanViewController = baseViewController;
[[[UIApplication sharedApplication] keyWindow].rootViewController presentViewController:self.baseScanViewController animated:YES completion:nil];
Expand Down

0 comments on commit d3105a6

Please sign in to comment.