ios 添加scrollView滚动到一定程度的方法。
//- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset
//{
// SJBLog(@"====%f,,,%f",velocity.y,scrollView.contentOffset.y);
// if (velocity.y > 0.09f) {
//velocity.y 是滑动的速率。。。。
//
// }else if (velocity.y < - 0.09f ){
//}
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{
SJBLog(@"====,,,%f,,%f",scrollView.contentOffset.y,self.mainTable.contentSize.height - (kScreenHeight - kNavigationBarHeight - kTabbarHeight) );
if (scrollView.contentOffset.y < - 50) {
//向下拉到50松手后,
}elseif (scrollView.contentOffset.y -(self.mainTable.contentSize.height - (kScreenHeight - kNavigationBarHeight - kTabbarHeight))>50){
//向上拉到50松手后,
}
}