可以实现多种不同表头效果:VGParallaxHeader

分享到:

VGParallaxHeader可以实现多种不同表头效果。包括拉长、放大图片、变换颜色等。

Import UIScrollView+VGParallaxHeader.h, and use as follows:

- (void)viewDidLoad {
[super viewDidLoad];
HeaderView *headerView = [HeaderView alloc] init];
// or self.tableView
[self.scrollView setParallaxHeaderView:headerView
mode:VGParallaxHeaderModeFill // For more modes have a look in UIScrollView+VGParallaxHeader.h
height:200
shadowBehaviour:VGParallaxHeaderShadowBehaviourDisappearing]; // For more behaviours have a look in UIScrollView+VGParallaxHeader.h 
}
#pragma mark - UIScrollView Delegate
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
// This must be called in order to work
[self.scrollView shouldPositionParallaxHeader];
// scrollView.parallaxHeader.progress - is progress of current scroll
NSLog(@"Progress: %f", scrollView.parallaxHeader.progress);
}

可以实现多种不同表头效果:VGParallaxHeader

项目主页:http://www.open-open.com/lib/view/home/1414740227044

昵    称:
验证码:

相关文档: