UITableViewHeaderFooterView encapsulation, headerfooterviewxib
UITableViewHeaderFooterView Encapsulation
Features
1. encapsulatedUITableViewHeaderFooterViewAllows users to better customize their ownHeaderView;
2. encapsulatedUITableViewCellAllows users to better customize their ownTableViewCell;
Usage
1. ImportCustomTableViewHeaderFooterView. h/. mFile andCustomTableViewCell. h/. mFile;
2. InheritanceCustomTableViewHeaderFooterViewInHeaderFooterViewFile to customize their own controls; specific use method can refer to: (https://github.com/makingitbest/TableViewHeaderFooterView/blob/master/TableViewHeaderFooterView/TestTabelViewHeaderFooterView.m)
3. InheritanceCustomTableViewCell, In the cell you want to set your own control; specific use can refer to: (https://github.com/makingitbest/TableViewHeaderFooterView/blob/master/TableViewHeaderFooterView/TestTableViewCell.m)
Source code
Github address https://github.com/makingitbest/TableViewHeaderFooterView
Details
1. Use[Self SetHeaderFooterBackgroundColor:[UIColor YellowColor]Method, you canHeaderFooterViewSet the background color:
2. Rewrite method:-(Instancetype) InitWithReuseIdentifier :(NSString*) ReuseIdentifier;
3.TableViewCellThe rewrite method is-(Instancetype) InitWithStyle :(UITableViewCellStyle) Style reuseIdentifier :(NSString*) ReuseIdentifier;
4. Note
(1) registerCellReuseIdentifierMust be consistent with the following creation, otherwise it is prone to errors;
(2) RegistrationHeaderFooterViewOfHeaderFooterViewReuseIdentifierMust be consistent with the following; otherwise, an error occurs;