ZBarReaderViewController.cameraOverlayView buttons do not fire

assist
2013-07-14
2013-08-29
  • assist
    assist
    2013-07-14

    Hi
    I am using ZBarReaderViewController with a custom landscape cameraOverlayView. When I add buttons to the view, they only fire if I place them on the top part of the screen, and fail to fire anywhere else.
    Tried both ZBarSDK 1.2 and 1.3.1 and got same result.
    Anyone experienced this problem and has a solution?
    Thanks

     
    Last edit: assist 2013-07-14
  • QRU
    QRU
    2013-08-01

    Are you implying that this happens only in Landscape mode? I use an overlayView and my buttons (I use 2) are in the bottom centre and the top right corner. I do not get the problem. along with the buttons I have implemented an invisible UIWebView to display a custom help screen. I needed to make sure that my buttons are defined to the overlayView and not the help view, also in the NIB they need to be defined after the help view so they can be touched, otherwise they will be visible but inaccessible. .... If you want to do this by command line you can try this .... [overlay_view bringSubviewToFront:button.imageview]; I've never tried it with a button but I believe it should work. ... if it doesn't work and a subview in the overlayview is actually the culprit there is a command to bring the subview to the back if the layers. ... bringSubviewToBack

     
    Last edit: QRU 2013-08-01
    • assist
      assist
      2013-08-29

      Just saw your reply - thanks.

      I found that this is indeed a z-order issue, but you solved it in a better way than I did. I added a button after the zbar view was invoked.