Skip to content

Commit effdcfd

Browse files
committed
Accept Pull Request #40 : (ElfSundae:develop -> coding:master)
2 parents 87a5124 + a855958 commit effdcfd

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Coding_iOS/Controllers/RootControllers/Tweet_RootViewController.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView{
411411
[self hideToolBar:NO];
412412
return;
413413
}
414+
#if 0 // -Elf, bugfix: loadedMore之后下滑scrollView时不显示底部tabBar了
414415
static float newY = 0;
415416
static float oldY = 0;
416417
newY= scrollView.contentOffset.y;
@@ -422,6 +423,14 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView{
422423
}
423424
oldY = newY;
424425
}
426+
#else
427+
CGFloat offsetY = [scrollView.panGestureRecognizer translationInView:scrollView.superview].y;
428+
if (offsetY > 40.f || scrollView.contentOffset.y == 0.f) {
429+
[self hideToolBar:NO];
430+
} else if (offsetY < -50.f) {
431+
[self hideToolBar:YES];
432+
}
433+
#endif
425434
}
426435

427436
- (void)hideToolBar:(BOOL)hide{

0 commit comments

Comments
 (0)