具有可拉伸和视差顶部视图的 uiscrollview
将 StrechyParallaxScrollView.h/m 文件复制到您项目中。
//create the top view
UIView *topView = [UIView new];
...
//create scroll view with top view just created
StrechyParallaxScrollView *strechy = [[StrechyParallaxScrollView alloc] initWithFrame:self.view.frame andTopView:topView];
//add it to your controllers view
[self.view addSubview:strechy];
CGFloat parallaxWeight: 顶部视图的视差速度
BOOL strechs: 启用/禁用拉伸行为(默认启用)
BOOL parallax: 启用/禁用视差行为(默认启用)