tjwoon / csZBar

Cordova plugin to integrate with the ZBar barcode scanning library.
Other
143 stars 180 forks source link

iPhone X, iOS11.2.6 Crash #134

Open TomBoy2015 opened 6 years ago

TomBoy2015 commented 6 years ago
 // 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];
cocfident commented 6 years ago

我也遇到了这个问题, 请问你解决了么

peterlai107 commented 5 years ago

我是把上面那幾行給mark掉就可以了~

prakashbarik90 commented 9 months ago

Comment this below code & then run,

UIView *infoButton = [[[[[self.scanReader.view.subviews objectAtIndex:2] subviews] objectAtIndex:0] subviews] objectAtIndex:infoButtonIndex];
    [infoButton setHidden:YES];