Note that there are some explanatory texts on larger screens.

plurals
  1. POTap gesture is not working on UIimageview
    primarykey
    data
    text
    <p>In my application i have three uiimageview which is moving randomly. on single tap on imageview it should hide. But my tapgesture is not working. on single tap it is not getting hide.</p> <pre><code>- (void)showAlert1:(UITapGestureRecognizer *)sender { if (image1.tag == 1) { image1.hidden = TRUE; } else { image1.hidden = FALSE; } } - (void)showAlert2:(UITapGestureRecognizer *)sender { if (image1.hidden == TRUE &amp;&amp; image3.hidden == FALSE) { image2.hidden = TRUE; } else { image2.hidden = FALSE; } } - (void)showAlert3:(UITapGestureRecognizer *)sender { if (image1.hidden == TRUE &amp;&amp; image2.hidden == TRUE) { image3.hidden = TRUE; } else { image3.hidden = FALSE; } } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; if (image1.tag == 1) { image1.userInteractionEnabled = YES; UITapGestureRecognizer* tap = [[UITapGestureRecognizer alloc] initWithTargetelf actionselector(imageAlerts]; tap.numberOfTapsRequired = 1; [image1 addGestureRecognizer:tap]; } if (image2.tag == 2) { image2.userInteractionEnabled = YES; UITapGestureRecognizer* tap = [[UITapGestureRecognizer alloc] initWithTargetelf actionselector(showAlert2]; tap.numberOfTapsRequired = 1; [image2 addGestureRecognizer:tap]; } if (image3.tag == 3) { image3.userInteractionEnabled = YES; UITapGestureRecognizer* tap = [[UITapGestureRecognizer alloc] initWithTargetelf actionselector(showAlert3]; tap.numberOfTapsRequired = 1; [image3 addGestureRecognizer:tap]; } } </code></pre> <p>Can anyone help me?</p> <p>Thanks in advance</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