-(void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
{
if (scrollView.contentOffset.y < -80) {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.3];
[scrollView setContentInset:UIEdgeInsetsMake(80, 0, 0, 0)];
// [scrollView setContentInset:UIEdgeInsetsMake(-80, 0, 0, 0)];
[UIView commitAnimations];
}
}
转载于:https://www.cnblogs.com/gaoxiao228/archive/2012/06/13/2548638.html