iphone - Using an NSFetchedResultsController without a UITableViewController -


I'm running into problems without using a NSFetchedResultsController related to UITableViewController.

According to Apple:

"The aim of NSFetchedResultsController is to efficiently manage the results obtained from core data fetch requests to provide data for a UITableView object."

So I first researched that using UITableViewController without any NSFetchedResultsController was appropriate and encounter where it concluded that, at least in some circumstances, this is not a bad idea.

But now I have come to an issue where the NSFED Result controller behaves differently when there is no appropriate UITableViewController. The problem occurs when there is no UITableViewController present, NSPetchedResultsController does not have indexPaths returned objects. I have documented this problem in one note (note that this is a simplification of this issue, in some circumstances there are indexpaths in objects, but I believe that Expected IndexPath without a UITB controller is a bad one The idea is.)

Without indexpath, I can not see returned items in their sort order, and I can not access specific objects. So what I'm seeing is either the NSPetchedResults controller to return objects with an index, or an alternative way to use objects. (Or maybe I should not use any NSFetchedResultsController at all?)

Rebuild alternative methods, have to pass an ore-faked object around a job, and then work with that array Will happen. But in my experience, creating new points for the FRC object always creates problems. I feel that every time I have ever tried to maintain an NSManagedObject with my own indicators, which eventually resulted in a bug. .

FYI, what I'm trying to create is a navigation bar, it's a navigation bar. If you imagine that you can add photos to the photo app dynamically, it will be wise for photos in the bar to manage it through an NSFetchedResultsController - so that adding a new photo will add dynamically to the end of the bar Too much like it

UPDATE Thank you for any thoughts with this problem! (Experimental) [NSFetchedResultsController fetchedObjects] objectAtIndex:]

Its use - [NSFetchedResultsController fetchedObjects] objectAtIndex:]

NSFetchedResultsController treats managed items as a collection, such as NSArray, which makes it easy to use. In fact, it only exposes the only reading property which is called the object, which is made up of NSARR type, making things even easier to get objects.


Comments