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

  • Home
  • SEARCH
  • 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 8152297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:40:08+00:00 2026-06-06T15:40:08+00:00

Bellow is the code i am calling when i press a button. The button

  • 0

Bellow is the code i am calling when i press a button. The button will call the method bellow. But i get a “unrecognized selector sent to instance” error. What am i doing wrong? The objects have been declared in another method before this one is called. I have also tried hiding the buttons but they also crash. Someone please help.

-(void) clearControlPannel{

    [buttCheck removeFromSuperview];
    [buttBet removeFromSuperview];
    [buttCall removeFromSuperview];
    [buttRaise removeFromSuperview];
    [buttFold removeFromSuperview];
    [betLabel removeFromSuperview];
    [betSlider removeFromSuperview];

}

The crash is:

Thread 1: EXC_BAD_ACCESS” on the [buttCheck removeFromSuper]; line

-[__NSCFDictionary removeFromSuperview]: unrecognized selector sent to instance 0x686b020 2012-06-24 19:08:12.175
HeadsUp[59630:f803] * Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSCFDictionary removeFromSuperview]: unrecognized selector sent to instance 0x686b020’

  • 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-06T15:40:10+00:00Added an answer on June 6, 2026 at 3:40 pm

    unrecognized selector sent to instance

    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.

    So, if you have a method that accept no parameter like yours

    - (void) clearControlPannel {...}
    

    the selector will be only clearControlPannel.

    Otherwise, if you have specified a parameter for that method (e.g. like the sender, the UIButton in this case) like

    - (void) clearControlPannel:(id)sender {...}
    

    the selector would be clearControlPannel:. Pay attention to :.

    If you provide more details we could help you.

    EDIT

    Just for pointing you in the right direction.

    If you have used – addTarget:action:forControlEvents: on a UIButton instance you have to check two things.

    First, did you set up the target correctly? The target is the object to which the action will be redirected.

    Second, did you set up the right selector for that action?

    Here an example:

    [myButton addTarget:self action@selector(mySelector:) ...];
    

    where

    - (void)mySelector:(id)sender {...}
    

    If the class where you have implemented that button will also respond to that action use self, otherwise you need to inject some other instance that will respond for that action.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get an error in the bellow code it says I cannot convert method
Following is my code with the business logic. I get below json by calling
The code bellow is giving error on w_add_ax_extra(1, 'k', 'v') previously it was w_add_ax_extra(some_id,
I'm calling an dialog from code behind and i've an asp:button. Now i'm trying
i call my asp.net page method like below code $.ajax({ type: POST, url: MyPage.aspx/GetItems,
The bellow code is a page with an IF statement calling the downloadpage. if
Currently I am calling a title from the database using the below code it
Is the code below bad practice or undefined behavior? Essentially i am calling a
I use the bellow code to load the main menu elements from some CMS,
work on asp.net vs 05 C#.Master page header contain the bellow code <script type=text/javascript

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.