顶部header图片拉伸放大
2016-11-02 本文已影响143人
tinaH
实现UIScrollViewDelegate的代理方法
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
CGFloat offsetY = scrollView.contentOffset.y;
if (offsetY<0) {
CGFloat scale = 1- (offsetY/50);
scale = (scale>=1)?scale:1;
self.topImage.transform = CGAffineTransformMakeScale(scale, scale);
}
}