質問

I have an app that uses Core Data and NSFetchedResultsController to create a UITableView with 3 sections, all based off a core data NSString attribute called itemRange. I have no problems creating or putting the items in sections, but I would like to add a particular feature that I'm not sure how to implement.

I want to be able to at first only show 1 or 2 items per section, but then have 1 more cell that says "see all" which expands the section to show all of the items.

Any ideas on how this could be implemented? Any help would be greatly appreciated.

正しい解決策はありません

他のヒント

Just modify your numberOfRowsInSection to display the desired number of rows. Use your own variable (or array thereof) to keep track of the expanded state of each section.

Then modify cellForRowAtIndexPath to either show the content delivered by the fetched results controller, or show the "see all" cell.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top