Note that there are some explanatory texts on larger screens.

plurals
  1. POCalling a method inside a delegate
    primarykey
    data
    text
    <p>I am using zBar SDK once a qr code detected a delegate will run, inside this delegate I defined a myView and used it as a overlay on the camera with information about that qr code. inside the myView there is a button which calls a method (testAction) but inside this method I cannot acces any of objects which I'd defined in the delegate, how can I access to to myView and objects inside that inside testAction?</p> <pre><code>- (void) imagePickerController: (UIImagePickerController*) reader didFinishPickingMediaWithInfo: (NSDictionary*) info { UIView *myView; CGRect frame= CGRectMake(0, 0, 320, 428); myView=[[UIView alloc] initWithFrame:frame]; myView.backgroundColor=[UIColor greenColor]; myView.alpha=0.7; CGRect labelFrame = CGRectMake( 0, 0, 500, 30 ); UILabel* myLabel = [[UILabel alloc] initWithFrame: labelFrame]; [myLabel setTextColor: [UIColor orangeColor]]; NSString *combined = [NSString stringWithFormat:@"%@%@", @"Title: ", symbol.data]; myLabel.text=combined; UIButton * myButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; myButton.frame = CGRectMake(10, 50, 100, 50); myButton.tag = 121; [myButton setTitle:@"Do Something" forState:UIControlStateNormal]; [myButton setBackgroundImage:nil forState:UIControlStateNormal]; [myButton addTarget:self action:@selector(testAction:) forControlEvents:UIControlEventTouchUpInside]; //[button setBackgroundColor:red]; [myView addSubview: myLabel]; [myView addSubview: myButton]; reader.cameraOverlayView=myView; } - (void)testAction: (id)sender{ //my issue is here } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload