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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:30:24+00:00 2026-06-08T00:30:24+00:00

Does anyone have an example of how to efficiently provide a UITableView with data

  • 0

Does anyone have an example of how to efficiently provide a UITableView with data from a Core Data model, preferable including the use of sections (via a referenced property), without the use of NSFetchedResultsController?

How was this done before NSFetchedResultsController became available? Ideally the sample should only get the data that’s being viewed and make extra requests when necessary.

Thanks,

Tim

  • 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-08T00:30:26+00:00Added an answer on June 8, 2026 at 12:30 am

    For the record, I agree with CommaToast that there’s at best a very limited set of reasons to implement an alternative version of NSFetchedResultsController. Indeed I’m unable to think of an occasion when I would advocate doing so.

    That being said, for the purpose of education, I’d imagine that:

    • upon creation, NSFetchedResultsController runs the relevant NSFetchRequest against the managed object context to create the initial result set;
    • subsequently — if it has a delegate — it listens for NSManagedObjectContextObjectsDidChangeNotification from the managed object context. Upon receiving that notification it updates its result set.

    Fetch requests sit atop predicates and predicates can’t always be broken down into the keys they reference (eg, if you create one via predicateWithBlock:). Furthermore although the inserted and deleted lists are quite explicit, the list of changed objects doesn’t provide clues as to how those objects have changed. So I’d imagine it just reruns the predicate supplied in the fetch request against the combined set of changed and inserted records, then suitably accumulates the results, dropping anything from the deleted set that it did previously consider a result.

    There are probably more efficient things you could do whenever dealing with a fetch request with a fetch limit. Obvious observations, straight off the top of my head:

    • if you already had enough objects, none of those were deleted or modified and none of the newly inserted or modified objects have a higher sort position than the objects you had then there’s obviously no changes to propagate and you needn’t run a new query;
    • even if you’ve lost some of the objects you had, if you kept whichever was lowest then you’ve got an upper bound for everything that didn’t change, so if the changed and inserted ones together with those you already had make more then enough then you can also avoid a new query.

    The logical extension would seem to be that you need re-interrogate the managed object context only if you come out in a position where the deletions, insertions and changes modify your sorted list so that — before you chop it down to the given fetch limit — the bottom object isn’t one you had from last time. The reasoning being that you don’t already know anything about the stored objects you don’t have hold of versus the insertions and modifications; you only know about how those you don’t have hold of compare to those you previously had.

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

Sidebar

Related Questions

Does anyone have suggestions for efficiently truncating the SciPy random distributions. For example, if
Does anyone have an example of setting up Authlogic with a namespace in Rails?
Does anyone have any example on how to put a date time picker inside
Does anyone have an example of rendering a remote file in XTK (https://github.com/xtk/X)? Is
Question: Does anyone have an example of a filter as you type dropdown control
Does anyone have a smal example of how to programmatically, in c/c++, load a
Does anyone have a working example of a video player built using Qt phonon?
Does anyone have a basic example to display a UIPickerView when a UITextField was
Does anyone have a simple example of implementing an async validation rule in csla?
Does anyone have a working example of OAuth authentication for twitter with Android? 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.