CBTableViewDataSource
CBTableViewDataSource copied to clipboard
Generic Thoughts
Why set tableFooterView
in - cb_makeDataSource:
and - cb_makeSectionWithData:
if(!self.tableFooterView) {
self.tableFooterView = [UIView new];
}
If set tableFooterView
, where is tableHeaderView
?
For grouped table view,return 0 in - tableView:heightForHeaderInSection:
and - tableView:heightForFooterInSection:
can cause table view use default height(not 0, greater than 30) for headers and footers, for this reason, return a small enough value (for example, FLT_EPSILON
or DBL_EPSILON
), then the height will be simulate 0.
This toolkit is very useful.
Thinks for your feedback and criticism.
I set a empty tableFooterView
in - cb_makeDataSource:
and - cb_makeSectionWithData:
in order to make regular table view (UITableView
which set up UITableViewStylePlain
as style) hidden unnecessary cell
when data less than one page.
Without this Settings, it will show up as follow:

I didn't know whether others dislike those unnecessary cell
like me. If most people ask for reserveing the appearance of the original, I will remove the default Settings in next version.
These two pictures, the first one is grouped table view, the second one is plain table view.
In the second one, a seperator is at the bottom of the last cell, I think it is uglier than the first one.
I like first one too. However, most of the time we usually use custom cell.