Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown class ZBarReaderView in Interface Builder file

Tags:

ios

iphone

I am working on the ZBarReader and getting an error

Unknown class ZBarReaderView in Interface Builder file

[UIView setReaderDelegate:]: unrecognized selector sent to instance 0x6859f20

Please look at an attached image at here or below so that you can picture what I am doing so far :-

enter image description here

In the storyboard, I do have a view and its custom class is ZBarReadView. I also wire it with IBOutlet in header file. In m file, I do

viewReader.readerDelegate = self;

and the error is shown after right after that.

Can anybody please point out what I have screwed up....

like image 702
tranvutuan Avatar asked Apr 11 '12 17:04

tranvutuan


2 Answers

I found the solution in a thread over here

You need to add the following code in your applicationDidLaunch in your AppDelegate:

// force view class to load so it may be referenced directly from NIB [ZBarReaderView class];

Should be running fine after that.

like image 155
Morothar Avatar answered Oct 30 '22 16:10

Morothar


you can also try to download 64bits ZbarSDK.

like image 29
Ned Avatar answered Oct 30 '22 15:10

Ned