Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Vinodh-G/ParallaxTableViewHeader
Parallax scrolling effect on UITableView header view when a tableView is scrolled
https://github.com/Vinodh-G/ParallaxTableViewHeader
Last synced: 3 months ago
JSON representation
Parallax scrolling effect on UITableView header view when a tableView is scrolled
- Host: GitHub
- URL: https://github.com/Vinodh-G/ParallaxTableViewHeader
- Owner: Vinodh-G
- Created: 2014-11-01T15:51:33.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2019-08-19T21:04:19.000Z (about 5 years ago)
- Last Synced: 2024-04-24T18:58:06.135Z (6 months ago)
- Language: Objective-C
- Homepage:
- Size: 821 KB
- Stars: 1,332
- Watchers: 40
- Forks: 171
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-ios - ParallaxTableViewHeader - Parallax scrolling effect on UITableView header view when a tableView is scrolled. (UI / Table View / Collection View)
- awesome-ios-star - ParallaxTableViewHeader - Parallax scrolling effect on UITableView header view when a tableView is scrolled. (UI / Table View / Collection View)
README
ParallaxTableViewHeader
=======================Parallax scrolling effect on UITableView header view when a tableView is scrolled
![solarized vim](http://i.imgur.com/xfYljPk.png)
![solarized vim](http://i.imgur.com/TBdyVeq.png)
![solarized vim](http://i.imgur.com/4ZgVLbf.png)Usage
========
Create a ParallaxHeaderView using either of one API's
+ (id)parallaxHeaderViewWithImage:(UIImage *)image forSize:(CGSize)headerSize
+ (id)parallaxHeaderViewWithCGSize:(CGSize)headerSizeset the parallaxHeaderView to UITableViewHeader as shown below
![solarized vim](http://i.imgur.com/JKTqxDe.png)override scrollViewDelegate method
- (void)scrollViewDidScroll:(UIScrollView *)scrollViewPass the UITableView or UIScrollView scrolling contentOffset to ParallaxHeaderView as shown below.
![solarized vim](http://i.imgur.com/p4mbQeB.png)"thats it"
Swift
======
let headerView: ParallaxHeaderView = ParallaxHeaderView.parallaxHeaderViewWithImage(UIImage(named: "YourImageName"), forSize: CGSizeMake(self.tableview.frame.size.height, 300)) as ParallaxHeaderView
self.tableview.tableHeaderView = headerViewfunc scrollViewDidScroll(scrollView: UIScrollView) {
let header: ParallaxHeaderView = self.tableview.tableHeaderView as ParallaxHeaderView
header.layoutHeaderViewForScrollViewOffset(scrollView.contentOffset)self.tableview.tableHeaderView = header
}Credits
========
Used UIImage+ImageEffects (Extentions) of Created by Aaron Pang,
achiving Bluring effect to headerView, support from iOS 7.0 onwords