nsfetchedresultscontrolle

[[[NSFetchedResultsController sections] objectAtIndex:0] numberOfObjects] > fetchLimit

I am currently having an issue where my UITableViewController/UITableView which uses an NSFetchedResultsController displays about 86 items when the fetchLimit on the fetchRequest for the FRC is 4. I know that 86 items satisfy the fetch itself, and I know that the reason that they appear is because the didChangeObject: atIndexPath... get...

NSFetchedResultsController section ordering

Hi everyone, I have a model like this one: I want to fetch the items in a grouped table view with the help of a NSFetchedResultsController where the Category.titles are the section titles, ordered with the help of Category.sortOrder. I tried to implement a compare- (which compares the sortOrder property) and description-method (whi...

Write SortDescriptor for a transforable attribute in core data?

I have an entity header and it has a attribute NSDictionary wich was declared transformable in model. Now I want to not sort the array of headers in fetchedRequestController. And passing nil or null object gives error. Please help its urgent. Let me reframe from the last time : if i have an entity, with a transformable attribute headers...

iPhone: NSFetchedResultsController with delegate and data update from a separate thread

Hi all! First of all, sorry for the too long question. I know that there are few questions here that discuss similar issues but none of these talks about NSFetchedResultsController with delegate together with update in separate thread. And none of the solutions has helped me. These are the existing questions: NSFetchedResultsControll...

Why is NSFetchedResultsController assigning fetched objects to multiple UITableView sections?

In another question of mine concerning the addition of an insert row in a UITableView backed by Core Data, I mentioned that my NSFetchedResultsController is assigning each object it fetches to a separate section in my UITableView. I assumed this was merely the default behavior, but Marcus S. Zarra said there might be something wrong with...

How can I return the count of objects for an FRC fetch?

I am trying to use the count of objects from my FRC fetch so that I can create an "Add" cell after all of my fetched objects have been listed in a UITableView. Is there a method for returning the number of objects fetched? I can only find a method that returns the count of sections for a given FRC. ...

NSFetchedResultsChangeDelete not being triggered

Has anyone run into this before? When I choose to delete a row from my tableView (populated by an FRC), the app doesn't crash or hang. It doesn't do anything. The delete button stays selected and if I click elsewhere on the simulator, the delete button deselects and disappears, but the cell is never removed form the UI. I'm sure there i...

NSFetchedResultsController: should I always check fetchedObjects==nil before calling -performFetch?

I'm using NSFetchedResultsController for my table view. I call -performFetch inside my controller's -viewDidLoad method. Sometimes my controller gets unloaded and then re-loaded, resulting in another call to -viewDidLoad and -performFetch. I found that this was causing an error: "NSFetchedResultsController error: section '(null)' not fo...

Predicate and distinct objects

I have entity Unit and Tag, each with to-many relation to other. I am using NSFetchedResultsController to manage the data. What I need is to return distinct Unit object into NSFetchedResultsController for condition Tag.show == YES. I'm not sure how to feed all this to NSFetchedResultsController. Set entity to Unit or Tag, how to build ...

How to count list size of parent entity in NSFetchedResultsController.

Hello, I'm using NSFetchedResultsController and I have a problem to query count in parent attribute. Assuming that following data model, 'Group', 'Category', 'Item'. - Item : All items belong to ‘Category’ - Category : ‘Category’ may belong to a certain ‘Group’ - Group : 'Group' has zero to N 'Category' And I want to search all items ...

How do I trigger a reload in an NSFetchedResultsController without changing the fetched object?

In my iPhone app, I have an NSFetchedResultsController showing User objects in a UITableView. The User Objects have 0-many Log objects. A summary of the Log objects are shown together with their User object in the UITableView. My app uses a tab bar, so user input in the logging tab require that the user tab's NSFetchedResultsController ...

Fully populating UITableView Index from NSFetchedResultsController

I have a UITableView that I've set up by following Apple's various Core Data examples. Everything works fine with this view, however, the index on the right hand side only has letters for sections that are actually in the table. I'd like to have all the letters filled in, and if the user taps on a letter that doesn't have a section, take...

How to cache NSFetchRequest results without NSFetchedResultsController?

Is there a way to cache NSFetchRequest results, but without using an NSFetchedResultsController? I know how to set the cache name for the results controller, but in a number of instances I just pull data from my core data store and want to cache it -- but have no need for a results controller. Any ideas on how to do this? I can't find an...

NSFetchedResultsController delegate allocating too many UITableViewCells

I'm using an NSFetchedResultsController in a standard way to update a UITableView whenever something changes in the related core-data entities. I'm doing the same as described in the Apple documentation. The problem I have is when I make a mass insert of new core-data entities. This causes the NSFetchedResultsController delegate to al...

How to switch UITableView's NSFetchedResultsController (or its predicate) programmatically?

I have a UITableView that displays a subset of a large number of entities named "Documents". The subset is defined by another entity "Selection". Selections are named, ordered list of documents. It Works fine, except when I want to change the displayed selection at run time. I get only a blank list. Basically, I need to change the pred...

how to loop through nsfetchedresultcontroller

Hi guys, in my app I need loop through all my entities in Core Data and I'm using NSFetchedresultcontroller. I'm doing it like this at the moment: NSArray *tempArray = [[NSArray alloc] initWithArray:self.fetchedResultsController.fetchedObjects]; for (MyClass *item in tempArray) { // do something } [tempArray release]; tempArray =...

display DetailsViewController using NSFetchedResultController

Hi everyone, In my iphone app I have core data to-many relation topic -->> question, so every topic contains a few questions, I figured out how to display list of topics in UItableView using NSFetchedResultController, but I can't get how shall I construct my FetchedResultController to display questions in chosen topic. I'm trying to fi...

Core Data app crashing with "controllerWillChangeContent : unrecognized selector sent to instance"

Hi. I've got a core data app with 2 views. The first view lists "Rooms", the second lists "Scenes" in rooms. The Rooms page has an edit NavItem button, which when pressed enables an add NavItem button. You can delete and add rooms from here. Added rooms simply appear with a default "New Room" name in the table. The second view is a list ...

NSFetchRequest and predicateWithBlock

Hello, I am playing with an app that uses Core Data and NSManagedObjects to populate a UITableView. There is only one class in my application, called Event. I have created the following custom instance method on Event: - (BOOL)isExpired { return ([[self.endOn dateAtEndOfDay] timeIntervalSinceNow] < 0); } I would like to limit t...

Get newest object added to NSFetchedResultsController?

Not even sure if this is feasible, but here's the use case: I have a RootView tableview that uses NSFetchedResultsController to manage the list. I tap an add button, which presents the AdditionViewController. The AdditionViewController uses a separatemanagedObjectContext to create the new object. On Save, the object is passed back to th...