UIScrollView 拖动下拉 刷新

-(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];
    }
}

posted @ 2012-06-13 23:31  高笑228  阅读(1417)  评论(0编辑  收藏  举报