2013-10-20 51 views

回答

0

這裏,看看這個,NTParallaxView - 它可以幫助您創建一個實現代碼如下(滾動型)與視差效果,就像路徑的時間線的頂視圖,用更簡單的方法。

+0

謝謝你告訴我NTParallaxView !!! – Rukkora

1

你可以改變你的ImageView範圍在下面的方法:

- (void)scrollViewDidScroll:(UIScrollView *)scrollView { 

    imgView.frame = CGRectMake(imgView.frame.origin.x, imgView.frame.origin.y, imgView.frame.size.width, height+scrollView.contentOffset.y); // height is static which is the default height of imgView object. 

    imgView.contentMode = UIViewContentModeScaleAspectFit;//This is to scale your image. 

}