Q:

Phonegap Barcodescanner Plugin - custom XIB for both iPad and iPhone

I have successfully included the Phonegap Plugin Barcodescanner from
Github iOS Phonegap Plugins.
The scan method works. I have tested it without a custom XIB file. It shows both on iPad and iPhone a nice overlay.
window.plugins.barcodeScanner.scan(success, fail)

As well as showing a custom XIB which I have followed step by step on the instructions 
window.plugins.barcodeScanner.scan(success, fail, ["BarcodeOverlay"])

But I am facing one problem: 
My custom XIB looks strange either on iPad or on the iPhone. Does anyone know how the plugin handles this with the standard XIB?

A:

Just FYI - solved it by customizing the CDVBarcodeScanner.mm class, method buildOverlayFromXib
- (UIView *)buildOverlayViewFromXib 
{
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
    // iPad-specific interface here
    self.alternateXib = @"BarcodeOverlay_iPad";
    [[NSBundle mainBundle] loadNibNamed:self.alternateXib owner:self options:NULL];
}
else if (IS_IPHONE_5) {
    self.alternateXib = @"BarcodeOverlay_iPhone5";
    [[NSBundle mainBundle] loadNibNamed:self.alternateXib owner:self options:NULL];
}
else
{
    // iPhone and iPod touch interface here
    self.alternateXib = @"BarcodeOverlay_iPhone";
    [[NSBundle mainBundle] loadNibNamed:self.alternateXib owner:self options:NULL];
}

if ( self.overlayView == nil )
{
    NSLog(@"%@", @"An error occurred loading the overlay xib.  It appears that the overlayView outlet is not set.");
    return nil;
}

return self.overlayView;        

}

