美文网首页
Markdown Test

Markdown Test

作者: 高压锅炖熊 | 来源:发表于2016-04-03 17:52 被阅读5次
- (void)scrollViewDidZoom:(UIScrollView *)scrollView{
    for (UIView *subview in scrollView.subviews){
        CGFloat offsetX = (scrollView.bounds.size.width > scrollView.contentSize.width)?(scrollView.bounds.size.width - scrollView.contentSize.width)/2 : 0.0;
        CGFloat offsetY = (scrollView.bounds.size.height > scrollView.contentSize.height)?(scrollView.bounds.size.height - scrollView.contentSize.height)/2 : 0.0;
        subview.center = CGPointMake(scrollView.contentSize.width/2 + offsetX,scrollView.contentSize.height/2 + offsetY);
        }
    }

只能说我认了
百度是用来测网络的

相关文章

网友评论

      本文标题:Markdown Test

      本文链接:https://www.haomeiwen.com/subject/sdsulttx.html