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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:15:47+00:00 2026-06-11T21:15:47+00:00

I am attempting to implement a collapsible table view in an iOS application. To

  • 0

I am attempting to implement a collapsible table view in an iOS application. To do this, I have a gesture recognizer set up in the section headers that will fire NSNotification to the parent controller, which will then refresh the view showing the expanded view.

Everything works up until the parent controller receives its message, which will cause the following error to occur:

'+[MasterViewController receiveTestNotification:]: unrecognized selector sent to class 0xa92a8'

I’ve looked around on this site and found a few posts relating to this error, but as far as I can tell I am not making those mistakes.

My registration happens in the initialization of the controller and looks like this:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveTestNotification:) name:@"RefreshNavigation" object:nil];

The receiver method I want called has this signature:

- (void) receiveTestNotification:(NSNotification *) notification

I send this notification like so, which is in a custom subclass of UIView that I am using as a section header:

[[NSNotificationCenter defaultCenter] postNotificationName:@"RefreshNavigation" object:self];

The examples I have found point to this exact configuration. I am quite certain that the controller isn’t being deallocated as it is used shortly thereafter throughout the app.

Any ideas on what I’m doing wrong?

  • 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-11T21:15:48+00:00Added an answer on June 11, 2026 at 9:15 pm

    Your error message indicates that the notification is being sent to your MasterViewController class, not a MasterViewController instance. You are getting an error because receiveTestNotification: is an instance method, not a class method.

    I believe the problem is that you are registering for the notification within the initialize method, which is a class method, so self in that context refers to the class itself, not an instance.

    Here is a very similar previous question where the solution was to instead register for the notification in the init method, which is an instance method.

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

Sidebar

Related Questions

I am attempting to implement a pagination bar above a table. I have a
I am attempting to implement a script that will fade in a new set
I am attempting to implement a custom view. This view should display an image
I am attempting to implement global error handling in my MVC application. I have
I am attempting to implement a quiet uninstall of my application. This works great
I'm attempting to implement a tap-gesture recognizer on a UIImageView. However I can't get
I am attempting to implement a form on APEX that allows the user (in
I am attempting to implement thread-safe usage of ConcurentHashMap within singleton spring service that
I'm attempting to implement OpenID with ASP.NET MVC (Yeah, we haven't heard that one
I'm attempting to implement a Save/Load feature into my small game. To accomplish this

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.