开发者

CoreData NSFetchedResultsController Empty Section Display

I would like to sh开发者_JS百科ow a fixed number of sections in a table view with a Fetched Results Controller as the data source.

If you image the contacts app where sections organised by the alphabet, it will not have a header for B if there are no contacts in that section, so the section headers you see are A then C.

I would like to display a section header in my table (for B), but without any rows. an empty section in effect.

Can NSFetchedResultsController do this for me?


No, you cannot show a section header for a section with no rows. That is not the way that a UITableView works. There are ways to trick it (empty rows) but it would be against the intention of the UI design on the iPhone.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜