Question

I really need help here. I'm pretty new to iOS/Objective-C so sorry if the problem resolution is simple.

I have followed all of the steps on the zBar tutorial in order to get the barcode reader working but I have had no success. I noticed that one of the steps said:'Declare support for the delegate protocol in ReaderSampleViewController.h'; when I pasted the code below, I started to get an error. Have I done something wrong here?

@interface ReaderSampleViewController : UIViewController
// ADD: delegate protocol
< ZBarReaderDelegate >

{ ...

Était-ce utile?

La solution

Make sure it looks like this. Also the simulator has to be set for 3.5inch as zbar's sdk doesn't support 4inch as of now. Thats actually what I am trying to fix now. If I find a fix I will post that back here as well.

#import "ZBarSDK.h"
@interface ReaderSampleViewController : UIViewController <ZBarReaderDelegate>

EDIT: Found the solution for 4 inch aka iPhone 5's here:http://www.federicocappelli.net/2012/10/05/zbar-library-for-iphone-5-armv7s/

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top