1

I'm trying to use the ZBar SDK to create an embedded QR Code reader just like shown in the example here: https://github.com/twotoasters/zbar (the Embeded Reader example)

The only difference is that I'm using it in storyboards. I tried copying the code into my application and everything seems to be fine, until I actually try to use it.
I'm working on a simulator, so the ZBarCameraSimulator is initializing and showing it's text, but when I try the "two finger click" (checked the Multitouch Option in the Subview attributes) it seems to ignore the action.
I guess there is a delegate or a handler missing, which was not required in with XIBs but is necessary within the Storyboards.

Anybody got any clues? Would be thankful.

Matt
  • 129
  • 2
  • 13

2 Answers2

1

Ok, looks like I found the solution, I was assuaging the readerView to a (weak, nonatomic) IBOutlet property, while the XIB project used "retain" option. I changed the option to strong (as what I understand from ARC, retain shouldn't be used with it) and it started working.

Matt
  • 129
  • 2
  • 13
0

I am also using this with storyboard and have had no trouble having the simulator recognise the two finger click. I do this by pressing Option+Mouse and holding it for a second.

I do however have follow on issues where the scanned image does not seem to be processed, but I think that my be due to a delegate issue.

  • Ok, maybe to make my problem more clear - using the "ready to use" project (with it's own screen) works perfect - new screen appears, says to double-click it and choose the pic from the library, then the pic i analyzed and works good. The problem appears when I want to embed the reader directly into a view - i.e. the scanner will be visible in my own view (so I'm not using ZBarReaderViewController but go deeper into using ZBarReaderView and CameraSimulator) – Matt Aug 06 '12 at 08:55