ZBar camera overlay always leaves space for controls even if they're not displayed

1.1k views Asked by At

I have a QR/bar code reader app that uses the ZBar SDK. I want to implement a custom overlay and remove everything else so the camera view covers the entire screen. The overlay is not difficult to implement. When I remove the ZBar controls via reader.showsZBarControls = NO; it removes the controls but leaves a black bar on the bottom of the screen, instead of filling the whole screen with the camera view, which is what I want.

I have tried using reader.wantsFullScreenLayout = YES; and reader.showsCameraControls = NO; without any luck. Has anyone done anything similar or have any suggestions?

1

There are 1 answers

0
PaperThick On BEST ANSWER

For future reference it was as simple as changing the size of the UIView in the reader, as such:

CGRect frame = reader.readerView.frame;
frame.size.height += 55;
reader.readerView.frame = frame;

Maybe it can help someone

Cudos to @iAmbitious for the help