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 530713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:13:32+00:00 2026-05-13T09:13:32+00:00

Are events posted by NSNotificationCenter postNotificationName processed before UI updating events? I need to

  • 0

Are events posted by NSNotificationCenter postNotificationName processed before UI updating events?

I need to know because otherwise my current program will crash in some rare cases.

Model code:

- (void)searchFinishedWithResults:(Results *)results {
    self.results = results;
    // If some table cells are loaded NOW, before notication is processed, we might crash!
    [[NSNotificationCenter defaultCenter]
     postNotificationName:SearchResultArrived object:nil];    
}

When processing the notication, I will run UITableView reloadData.

However, consider if before processing the notication, UI has to be updated. In this case -tableView:cellForRowAtIndexPath:indexPath will be called, but results object has changed, it will fetch old data.

  • 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-05-13T09:13:33+00:00Added an answer on May 13, 2026 at 9:13 am

    The notifications are dispatched exactly when you call postNotification: or postNotificationName:object:, in a synchronous fashion, one observer after the other (in no particular order). In the case you show, they would be sent exactly after you assign the variable “results” and before the method ends.

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

Sidebar

Related Questions

If multiple events are posted using wxPostEvent/wxCallAfter from same thread e.g. on button click
Events are really awesome, and I wouldn't know what I would do without them,
I am capturing some events in a C# program that come back with the
For inspecting all events posted to the views of the window, I want to
i have questions regarding the shake detection that posted here before, here is a
I'm working on including a list of events posted to a Facebook Page on
I've got a timer that I'm updating dynamically. ------------------update -------------------------- when I first posted
When calling rdma_disconnect(), do I get completion queue events for all posted recv work
I am currently implementing custom events and listeners according to the code posted below.
I have posted a question before, Moving away from VSS , in which I

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.