Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9058249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:40:43+00:00 2026-06-16T14:40:43+00:00

I really need help here. I’m pretty new to iOS/Objective-C so sorry if the

  • 0

I really need help here. I’m pretty new to iOS/Objective-C so sorry if the problem resolution is obvious or if my code is terrible. Be easy on me!! 🙂

I’m struggling to integrate ZBarSDK for reading QR Codes into an iPad app i’m building. If I use ZBarReaderController (of which there are plenty of tutorials and guides on implementing), it works fine. However I want to make the camera come up in a UIView as opposed to the fullscreen camera.

Now I have gotten as far as making the camera view (readerView) come up in the UIView (ZBarReaderView) as expected, but I get an error when it scans a code. The error does not come up until a code is scanned making me believe this is either delegate related or something else.

Here’s the important parts of my code: (ZBarSDK.h is imported at the PCH file)

SignInViewController.h

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>

@class AVCaptureSession, AVCaptureDevice;

@interface SignInViewController : UIViewController
< ZBarReaderDelegate >
{
    ZBarReaderView *readerView;
    UITextView *resultText;
}

@property (nonatomic, retain) UIImagePickerController *imgPicker;
@property (strong, nonatomic) IBOutlet UITextView *resultText;
@property (strong, nonatomic) IBOutlet ZBarReaderView *readerView;

-(IBAction)StartScan:(id) sender;

SignInViewController.m

#import "SignInViewController.h"

@interface SignInViewController ()

@end

@implementation SignInViewController


@synthesize resultText, readerView;

-(IBAction)StartScan:(id) sender
{
readerView = [ZBarReaderView new];
readerView.readerDelegate = self;

readerView.tracksSymbols = NO;

readerView.frame = CGRectMake(30,70,230,230);
readerView.torchMode = 0;
readerView.device = [self frontFacingCameraIfAvailable];

ZBarImageScanner *scanner = readerView.scanner;
[scanner setSymbology: ZBAR_I25
               config: ZBAR_CFG_ENABLE
                   to: 0];


[self relocateReaderPopover:[self interfaceOrientation]];

[readerView start];

[self.view addSubview: readerView];
resultText.hidden=NO;

}


- (void) readerControllerDidFailToRead: (ZBarReaderController*) reader
                         withRetry: (BOOL) retry{
NSLog(@"the image picker failing to read");

}

- (void) imagePickerController: (UIImagePickerController*) reader     didFinishPickingMediaWithInfo: (NSDictionary*) info
{


NSLog(@"the image picker is calling successfully %@",info);
id<NSFastEnumeration> results = [info objectForKey: ZBarReaderControllerResults];
ZBarSymbol *symbol = nil;
NSString *hiddenData;
for(symbol in results)
    hiddenData=[NSString stringWithString:symbol.data];


NSLog(@"the symbols  is the following %@",symbol.data);

resultText.text=symbol.data;


NSLog(@"BARCODE= %@",symbol.data);

NSLog(@"SYMBOL : %@",hiddenData);
resultText.text=hiddenData;

}

The error I get when a code is scanned:

2012-12-16 14:28:32.797 QRTestApp[7970:907] -[SignInViewController     readerView:didReadSymbols:fromImage:]: unrecognized selector sent to instance 0x1e88b1c0
2012-12-16 14:28:32.799 QRTestApp[7970:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SignInViewController readerView:didReadSymbols:fromImage:]: unrecognized selector sent to instance 0x1e88b1c0'

I’m not too worried about what happens with the results just yet, just want to get over this error. Took me ages just to get the camera to come up in the UIView due to severe lack of tutorial or documentation on ZBarReaderView (for beginners anyway). Thanks all.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T14:40:45+00:00Added an answer on June 16, 2026 at 2:40 pm

    I fixed this. Had an incorrect delegate name. It should have been “ZbarReaderViewDelegate”. I was missing the “view” part. Doh!!

    @interface SignInViewController : UIViewController
    < ZBarReaderViewDelegate >
    {
    ZBarReaderView *readerView;
    UITextView *resultText;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry to bother again, but I really need help transforming this Python2 code into
sorry if you'll find this question stupid, but I really need help. Here's some
Greeting all wise man! I really need your help here as I'm new to
I really need help here. I'm desperate at this point. I have NSOperation that
Hello i am new in android and i really need help with something. I
This might be a really newb question, but I really need help here, I
I really need some help here, I've been at this for almost 2 weeks.
I'm confused about how DQL works, and really need some help here. I have
This is my first question here :) I really need help with some servers
here i am again :( got big problem hiks ... need HELP !!! i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.