Note that there are some explanatory texts on larger screens.

plurals
  1. POmulti button tag multi ple view
    primarykey
    data
    text
    <p>On click each button showing subview view contains learn and play option.While clicking , want to show the different view depends on the uibutton selection.Here my code .</p> <pre><code>-(IBAction)animals { CGPoint point = [tap locationInView:self.animalsbut]; pv = [PopoverView showPopoverAtPoint:point inView:animalsbut withContentView:alertvu delegate:self]; pv.tag=1; } -(IBAction)birds { CGPoint point = [tap locationInView:self.birdsbut]; pv = [PopoverView showPopoverAtPoint:point inView:birdsbut withContentView:alertvu delegate:self]; pv.tag=2; //[self checkingme:pv.tag]; } -(IBAction)direct { CGPoint point = [tap locationInView:self.direcbut]; pv = [PopoverView showPopoverAtPoint:point inView:direcbut withContentView:alertvu delegate:self]; pv.tag=4; } -(IBAction)fruit { CGPoint point = [tap locationInView:self.fruitbut]; pv = [PopoverView showPopoverAtPoint:point inView:fruitbut withContentView:alertvu delegate:self]; pv.tag=3; } </code></pre> <p>method</p> <pre><code>-(IBAction)check:(NSInteger)sender { UIButton *mybutton =(UIButton*) [self.view viewWithTag:sender]; if(pv.tag==1) { NSLog(@"button log%d",mybutton.tag); if(mybutton.tag==0) { animallearn *aview=[[animallearn alloc]initWithNibName:@"animallearn" bundle:nil]; [self.navigationController pushViewController:aview animated:YES]; [pv performSelector:@selector(dismiss) withObject:nil afterDelay:0.1f]; } else //(mybutton.tag==1) { playview *pview=[[playview alloc]initWithNibName:@"playview" bundle:nil]; [self.navigationController pushViewController:pview animated:YES]; [pv performSelector:@selector(dismiss) withObject:nil afterDelay:0.1f]; } } else if(pv.tag==2) { if(mybutton.tag==0) { birdview *aview=[[birdview alloc]initWithNibName:@"birdview" bundle:nil]; [self.navigationController pushViewController:aview animated:YES]; [pv performSelector:@selector(dismiss) withObject:nil afterDelay:0.1f]; } else if(mybutton.tag==1) { playview *pview=[[playview alloc]initWithNibName:@"playview" bundle:nil]; [self.navigationController pushViewController:pview animated:YES]; [pv performSelector:@selector(dismiss) withObject:nil afterDelay:0.1f]; } } else if(pv.tag==3) { if(mybutton.tag==0) { fruitview *aview=[[fruitview alloc]initWithNibName:@"fruitview" bundle:nil]; [self.navigationController pushViewController:aview animated:YES]; [pv performSelector:@selector(dismiss) withObject:nil afterDelay:0.1f]; } else if(mybutton.tag==1) { playview *pview=[[playview alloc]initWithNibName:@"playview" bundle:nil]; [self.navigationController pushViewController:pview animated:YES]; [pv performSelector:@selector(dismiss) withObject:nil afterDelay:0.1f]; } } else if(pv.tag==4) { if(mybutton.tag==0) { directview *aview=[[directview alloc]initWithNibName:@"directview" bundle:nil]; [self.navigationController pushViewController:aview animated:YES]; [pv performSelector:@selector(dismiss) withObject:nil afterDelay:0.1f]; } else if(mybutton.tag==1) { playview *pview=[[playview alloc]initWithNibName:@"playview" bundle:nil]; [self.navigationController pushViewController:pview animated:YES]; [pv performSelector:@selector(dismiss) withObject:nil afterDelay:0.1f]; } } else { return ; } } </code></pre> <p>Here problem is whenever i second button it showing the button tag 0 view only in all the cases?Can any one help me to sort it out</p>
    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