IOS removes the UItableview header (footer) view stickiness (sticky )?, Uitableviewfooter
# Pragma mark -- UIScrollViewDelegate proxy
# Pragma mark remove UItableview headerview sticky)
-(Void) scrollViewDidScroll :( UIScrollView *) scrollView {
CGFloat sectionHeaderHeight = 40;
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 );
}
}
How to delete multiple data entries in uitableview in ios or delete all
Give you a thought
If your data is added to UITableViewCell through the NSArray array, you can use the edit mode titleForDeleteConfirmationButtonForRowAtIndexPath or didSelectRowAtIndexPath to remove the corresponding array element or clear the array, and reload your UITableView through reloadData
Special Handling in special cases
-(UIView *) tableView :( UITableView *) tableView viewForFooterInSection :( NSInteger) how to hide a section
This method is used to set the table foot. If you do not write this method, the system defaults to no table foot and does not know what the view is to be hidden ..
In addition, it is clear whether it is header or footer;