Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>unrecognized selector sent to instance</p> </blockquote> <p>error is due to the fact that the runtime is not able to find the method that will respond to that specific action. In other words, it's not able to map the name of your method (the selector) with its implementation.</p> <p>So, if you have a method that accept no parameter like yours</p> <pre><code>- (void) clearControlPannel {...} </code></pre> <p>the selector will be only <code>clearControlPannel</code>.</p> <p>Otherwise, if you have specified a parameter for that method (e.g. like the sender, the <code>UIButton</code> in this case) like</p> <pre><code>- (void) clearControlPannel:(id)sender {...} </code></pre> <p>the selector would be <code>clearControlPannel:</code>. Pay attention to <code>:</code>.</p> <p>If you provide more details we could help you.</p> <p><strong>EDIT</strong></p> <p>Just for pointing you in the right direction.</p> <p>If you have used <code>– addTarget:action:forControlEvents:</code> on a <code>UIButton</code> instance you have to check two things.</p> <p>First, did you set up the <code>target</code> correctly? The <code>target</code> is the object to which the action will be redirected.</p> <p>Second, did you set up the right selector for that <code>action</code>?</p> <p>Here an example:</p> <pre><code>[myButton addTarget:self action@selector(mySelector:) ...]; </code></pre> <p>where</p> <pre><code>- (void)mySelector:(id)sender {...} </code></pre> <p>If the class where you have implemented that button will also respond to that action use <code>self</code>, otherwise you need to inject some other instance that will respond for that action.</p>
 

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