✎
编程开发网
首页
C语言
C++
面试
Linux
函数
Windows
数据库
下载
搜索
当前位置:
首页
->
AI编程基础
->
c++编程基础
判断滑动方向UITableView
2014-11-24 11:05:15
·
作者:
·
浏览:
0
标签:
判断
滑动
方向
UITableView
-(void)scrollViewWillBeginDragging:(UIScrollView*)scrollView{
lastContentOffset = scrollView.contentOffset.y;
}
-( void )scrollViewDidScroll:( UIScrollView *)scrollView {
if (scrollView. contentOffset.y < lastContentOffset )
{
//向上
[ self.navigationController setNavigationBarHidden : NO animated : YES ];
} else if (scrollView. contentOffset.y > lastContentOffset )
{
//向下
[ self.navigationController setNavigationBarHidden : YES animated : YES ];
}
}