Recently encountered the integration of tableview issues. Part of the comparison idiot, just beginner easy to commit ~
1, about TableView left free 15 pixels of the problem;
2, about the TableView redundant division line hidden problems;
3, about the tableview of the Headercell between the space between the question;
4. Questions about Select and deselect.
1, about TableView left free 15 pixels of the problem
There's always a place on the left.
Workaround:
Calling the Leftline method is fine-The following method does not need to be called, is the Protocol method
-(void) _leftline {if([_moretableview respondstoselector: @selector (SetSeparatorinset:)]) {[_moretableviewSetSeparatorinset:uiedgeinsetszero]; }if([_moretableview respondstoselector: @selector (SetLayoutmargins:)]) {[_moretableviewSetLayoutmargins:uiedgeinsetszero]; }}-(void) TableView: (UITableView *) TableView Willdisplaycell: (UITableViewCell *) cell forRowatindexpath: (Nsindexpath *) indexpath{if([Cell Respondstoselector: @selector (SetSeparatorinset:)]) {[cellSetSeparatorinset:uiedgeinsetszero]; }if([Cell Respondstoselector: @selector (SetLayoutmargins:)]) {[cellSetLayoutmargins:uiedgeinsetszero]; }
2, about the TableView redundant split line hidden problem
Sometimes the cell below is useless, but there is a split line, hiding the way
[tableView setTableFooterView:[[UIView alloc] init]];
There are a lot of ways, but it seems to me the simplest ~
3, about the TableView Headercell between the space between the question
What we want is this:
But it's possible to get this:
This is due to the TableView style setting error, the former is Uitableviewstyleplain, and the latter is uitableviewstylegrouped
To pay attention to the style of understanding, not tableview have a lot of sections to choose uitableviewstylegrouped,uitableviewstylegrouped just show TableView a style, There are several unrelated to the section
4. Questions about Select and deselect
This question is pure cruel ~
Select and deselect, the function is very long, careful and careful again carefully, otherwise, if the error, adjust the bug is this error really will be very hard ~
Above the first two methods from other people's blog ~
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
A few questions about TableView solution integration