标签:
首先设置一个旧的偏移量为0;
self.oldContent = 0;
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
if (scrollView.contentOffset.y > _oldContent) {
//如果当前位移大于缓存位移,说明是tableView向下移动
[self foldingViewDidAnimateToFold];
} else {
[self foldingViewDidAnimateToFlat];
}
_oldContent = scrollView.contentOffset.y;
}
标签:
原文地址:http://www.cnblogs.com/tian-sun/p/4500252.html