Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios11 fixes #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions ios/CsZBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ - (void)scan: (CDVInvokedUrlCommand*)command;
}

// Hack to hide the bottom bar's Info button... originally based on http://stackoverflow.com/a/16353530
NSInteger infoButtonIndex;
if ([[[UIDevice currentDevice] systemVersion] compare:@"10.0" options:NSNumericSearch] != NSOrderedAscending) {
infoButtonIndex = 1;
} else {
infoButtonIndex = 3;
}
UIView *infoButton = [[[[[self.scanReader.view.subviews objectAtIndex:2] subviews] objectAtIndex:0] subviews] objectAtIndex:infoButtonIndex];
[infoButton setHidden:YES];
// NSInteger infoButtonIndex;
// if ([[[UIDevice currentDevice] systemVersion] compare:@"10.0" options:NSNumericSearch] != NSOrderedAscending) {
// infoButtonIndex = 1;
// } else {
// infoButtonIndex = 3;
// }
// UIView *infoButton = [[[[[self.scanReader.view.subviews objectAtIndex:2] subviews] objectAtIndex:0] subviews] objectAtIndex:infoButtonIndex];
// [infoButton setHidden:YES];

//UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem]; [button setTitle:@"Press Me" forState:UIControlStateNormal]; [button sizeToFit]; [self.view addSubview:button];
CGRect screenRect = [[UIScreen mainScreen] bounds];
Expand Down
3 changes: 3 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@
<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
<string>For Barcode Scanning</string>
</config-file>
<config-file target="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
<string>Select Barcode For Scanning</string>
</config-file>

<framework src="AVFoundation.framework" />
<framework src="CoreMedia.framework" />
Expand Down