IOS removes the UItableview header (footer) view stickiness (sticky )?, Uitableviewfooter

Source: Internet
Author: User

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;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.