CBTableViewDataSource icon indicating copy to clipboard operation
CBTableViewDataSource copied to clipboard

Generic Thoughts

Open Daniate opened this issue 8 years ago • 3 comments

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.

Daniate avatar Jun 23 '16 03:06 Daniate

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.

cocbin avatar Jun 23 '16 05:06 cocbin

image image 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.

Daniate avatar Jun 23 '16 06:06 Daniate

I like first one too. However, most of the time we usually use custom cell.

cocbin avatar Jun 23 '16 13:06 cocbin