Note that there are some explanatory texts on larger screens.

plurals
  1. PONon-Core Data data in a Core Data-backed UITableView
    primarykey
    data
    text
    <p>Take a look at the Music.app (or iPod.app). The root Albums view has an "All Songs" row. The root Songs view has a "Shuffle" row. The root Playlists view has an "Add Playlist..." row. Static data mixed in the same UITableView with (presumably) Core Data data. I'm wondering how Apple achieved this.</p> <p>I've tried two different approaches, both failed. Like the Music.app, my views also have a UISeachBar in the tableHeaderView. My first attempt kept track of how many "static" rows I had and adjusted the indexPath provided to the various UITableView and NSFetchedResultsController methods that require section and row info. Everything was working great until I implemented the NSFetchedResultsControllerDelegate methods to allow creating, editing and deleting. The <code>insertRowsAtIndexPaths:withRowAnimation:</code> method (and similar) gets tripped up on my adjusted indexPaths. The default indexPaths don't work as is either.</p> <p>My second attempt was to nest another UITableView in the tableHeaderView of my primary UITableView to use for the static rows (and to house the UISeachBar in it's own tableHeaderView). This approach didn't even make it to the editable stage. The UISearchBar ends up being overlapped by the root UITableView's sectionIndex scrubber and no longer slides up behind the UINavigationBar when scrolling a short list.</p> <p>So rather than diagnose my specific problems I'm asking for suggestions on how Apple achieves this. Could they be fetching the data once, caching it in an NSArray and constructing a nested NSArray of sections and rows that includes both the static and Core Data rows?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload