uiscrollview 滚动

时间:2015-01-30 17:01:26   收藏:0   阅读:144

获取当前滚动到的位置

- (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滚动到指定位置

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!