#pragma UIScrollView
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
} else {
return YES;
}
}
//隐藏导航栏的方法
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
NSLog(@"scrollViewDidScroll---->%f",self.myTableView.contentOffset.y);
if (self.myTableView.contentOffset.y >= 171)
{
self.addNavBar.hidden = YES;
NSLog(@"隐藏导航栏");
}
if (self.myTableView.contentOffset.y <= 171) {
}
}