我必须在向下滚动时隐藏导航栏,并在Facebook顶部滚动时显示。怎么办?
答案 0 :(得分:0)
您必须使用UIScrollViewDelegate
方法,例如:--->
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
//animate your view here when you scroll
}
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
{
//reset your view to the initial position
}
答案 1 :(得分:0)
使用UIScrollView Delegates检测滚动
并使用
[navigationController setNavigationBarHidden:YES animated:YES]; //将隐藏NavigationBar