tableView的plain樣式的headerView的上拉過程當中懸停解決方法

//去掉UItableview headerview黏性(sticky) 去掉header的浮動效果io

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {table

    if (scrollView == self.tableView)scroll

    {tab

        CGFloat sectionHeaderHeight = 100; //sectionHeaderHeighttableview

        if (scrollView.contentOffset.y<=sectionHeaderHeight&&scrollView.contentOffset.y>=0) {view

            scrollView.contentInset = UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0);vi

        } else if (scrollView.contentOffset.y>=sectionHeaderHeight) {co

            scrollView.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, 0, 0);header

        }浮動

    }

}

相關文章
相關標籤/搜索