title: Using custom sections with NSFetchedResultsController?
body: <p>I'm making a sectioned table with fetched results, but am having a hard time getting custom sections worked out.</p>
  
  <p>Normally one would just have an attribute to sort by, and use <code>sectionNameKeyPath:</code> to generate the sections. But my sorting attribute is calculated on the fly, and I can't seem to get the <code>fetchedResultsController</code> to use it correctly...</p>
  
  <p><strong>Update:</strong> Using <a href="https://stackoverflow.com/users/106658/jbrennan">jbrennan</a>'s advice below, I'm really close to the intended functionality. I've added a Category to <code>NSDate</code> that returns a "days ago" number; putting that in here gives me sections based on those numbers:</p>
  
  <pre><code>NSFetchedResultsController *aFetchedResultsController =
      [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest
      managedObjectContext:managedObjectContext
      sectionNameKeyPath:@"myDateAttribute.daysAgo"
      cacheName:@"Root"];
  </code></pre>
  
  <p>Here's where I'm stuck: I don't need them sorted by "days ago," I need them sorted via some calculations based on <em>other</em> attributes in the entity. So I can't just call that custom Category method, I need to call a method with <em>arguments</em>, like so:</p>
  
  <pre><code>[myDateAttribute sortingRoutine:thisObject.value]
  </code></pre>
  
  <p>Or something like that. I hope that makes some degree of sense. Thanks a ton if you can help :)</p>