Achieve the spacing between UITableviewCell

There is no space between the TableviewCell of the system, we can not change, it should be how to achieve it?
way 1:
by setting the cell to achieve contentView, cell in the top or bottom of the contentView to leave a certain distance, so there will be a space between the effect of cell. But this way there is a click effect in the cell, it will be obvious to see that there are layered, because this time cell is clicked, contentView will have the effect of the system click shadow. This slide was removed in the cell left, when the top operation, left slide out of view will be a part of (height = left slide show (the height of the cell – leaving the pitch height) + left the pitch height we don’t need [
])

Achieve the spacing between UITableviewCell
picture 1.png

way 2:
through the indirect way of grouping, each group of Header can be regarded as the spacing between the cell, each group has only one cell (data display will be relatively simple). Nonsense not say the code!

#pragma mark - UITableViewDataSource, UITableViewDelegate - (NSInteger) numberOfSectionsInTableView: (UITableView * tableView) {return 10;} - (CGFloat) tableView: (UITableView *) tableView heightForHeaderInSection: (NSInteger) section {return 10;} - (NSInteger) tableView: (UITableView *) tableView numberOfRowsInSection: (NSInteger section) {return} (CGFloat - 1;) tableView: (UITableView *) tableView heightForRowAtIndexPath: (NSIndexPath * indexPath) {return 100;}
Achieve the spacing between UITableviewCell
picture 2
Achieve the spacing between UITableviewCell
each group of Header will stay at the top of the.Gif tableview

but, this is still a problem, because the system default packet when each group of Header will stay at the top of the tableview, how to deal with it?

UItableview headerview / / remove viscous (sticky) - (void) scrollViewDidScroll: (UIScrollView * scrollView) {if (scrollView = = self.tableView) {CGFloat sectionHeaderHeight = 10; //sectionHeaderHeight if (scrollView.contentOffset.y < sectionHeaderHeight = & & scrollView.contentOffset.y > = 0) {scrollView.contentInset = UIEdgeInsetsMake (-scrollView.contentOffset.y, 0, 0, 0);} else if (scrollView.contentOffset.y = > sectionHeaderHeight) {scrollView.contentInset = UIEdgeInsetsMake (-sectionHeaderHeight, 0, 0, 0);}}}
Achieve the spacing between UITableviewCell
cancel UItableview headerview sticky