- Notifications
You must be signed in to change notification settings - Fork16
Simple parallax header for UIScrollView.
License
ngochiencse/HPParallaxHeader
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
HPParallaxHeader is a Swift conversion fromhttps://github.com/maxep/MXParallaxHeader.
HPParallaxHeader is a simple header class for UIScrollView.
In addition, HPScrollView is a UIScrollView subclass with the ability to hook the vertical scroll from its subviews, this can be used to add a parallax header to complex view hierachy. Moreover, HPScrollViewController allows you to add a HPParallaxHeader to any kind of UIViewController.
UIScrollView | HPScrollViewController |
---|---|
![]() | ![]() |
If you want to try it, simply run:
pod try HPParallaxHeader
- Adding a parallax header to a UIScrollView is straightforward, e.g:
letheaderView=UIImageView()headerView.image=UIImage(named:"success-baby")headerView.contentMode=.scaleAspectFitletscrollView=UIScrollView()scrollView.parallaxHeader.view= headerViewscrollView.parallaxHeader.height=150scrollView.parallaxHeader.mode=.fillscrollView.parallaxHeader.minimumHeight=20
- The HPScrollViewController is a container with a child view controller that can be added programmatically or using the custom segue HPScrollViewControllerSegue.
You can useSwift Package Manager directly within Xcode or add it to thedependencies
value of yourPackage.swift
.
dependencies:[.package(url:"https://github.com/ngochiencse/HPParallaxHeader",.upToNextMajor(from:"1.1.8"))]
HPParallaxHeader is available throughCocoaPods. To install it, simply add the following line to your Podfile:
pod"HPParallaxHeader"
Documentation is available throughGitHub.
HPParallaxHeader is available under the MIT license. See the LICENSE file for more info.
About
Simple parallax header for UIScrollView.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.