Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/vinodh-g/parallaxtableviewheader

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/vinodh-g/parallaxtableviewheader

  • v0.0.0-20150117090610-ab379ed14d7e
  • Source
  • Go
  • Socket score

Version published
Created
Source

ParallaxTableViewHeader

Parallax scrolling effect on UITableView header view when a tableView is scrolled

solarized vim solarized vim solarized vim

Usage

Create a ParallaxHeaderView using either of one API's

  • (id)parallaxHeaderViewWithImage:(UIImage *)image forSize:(CGSize)headerSize
  • (id)parallaxHeaderViewWithCGSize:(CGSize)headerSize

set the parallaxHeaderView to UITableViewHeader as shown below solarized vim

override scrollViewDelegate method

  • (void)scrollViewDidScroll:(UIScrollView *)scrollView

Pass the UITableView or UIScrollView scrolling contentOffset to ParallaxHeaderView as shown below. solarized vim

"thats it"

Swift

let headerView: ParallaxHeaderView = ParallaxHeaderView.parallaxHeaderViewWithImage(UIImage(named: "YourImageName"), forSize: CGSizeMake(self.tableview.frame.size.height, 300)) as ParallaxHeaderView
self.tableview.tableHeaderView = headerView

func  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

FAQs

Package last updated on 17 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc