uiscrollview 滚动

获取当前滚动到的位置

- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{   
    CGRect bounds = self.scrollview.bounds;
    CGPoint offset = self.scrollview.contentOffset; 
UIEdgeInsets inset = self.scrollview.contentInset;
CGFloat currentOffset = offset.x + bounds.size.width - inset.bottom;
NSLog(@"%2f",currentOffset);
}

 设置offset滚动到指定位置

posted @ 2015-01-30 14:25  苏糊  阅读(223)  评论(0编辑  收藏  举报