标签:off 问题 有关 else tab tableview cti 解决 static
#pragma mark section不悬停
static CGFloat const sectionHeight = 12.0f;//section的高度值
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
CGFloat sectionHeaderHeight = sectionHeight;
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);
}
}
//解决搜索滑动后view下移的问题
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
CGFloat off_y = scrollView.contentOffset.y;
if (off_y < 0) {
self.tableView.contentOffset = CGPointMake(0, 0);
}
}
标签:off 问题 有关 else tab tableview cti 解决 static
原文地址:http://www.cnblogs.com/jiangxue-iOS/p/7602971.html