Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simple parallax header for UIScrollView.

License

NotificationsYou must be signed in to change notification settings

ngochiencse/HPParallaxHeader

Repository files navigation

Travis (.com)VersionSwift 5.4Carthage compatibleLicenseCocoapods platforms

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.

UIScrollViewHPScrollViewController
DemoDemo

Usage

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.

Installation

Swift Package Manager

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"))]

CocoaPods

HPParallaxHeader is available throughCocoaPods. To install it, simply add the following line to your Podfile:

pod"HPParallaxHeader"

Documentation

Documentation is available throughGitHub.

Author

Hien Pham

Twitter URL

License

HPParallaxHeader is available under the MIT license. See the LICENSE file for more info.

About

Simple parallax header for UIScrollView.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp