DMParallaxHeader
DMParallaxHeader is a Swift conversion from https://github.com/maxep/MXParallaxHeader.
Usage
If you want to try it, simply run:
pod try DMParallaxHeader
- Adding a parallax header to a UIScrollView is straightforward, e.g:
let headerView = UIImageView(frame: imageFrame)
headerView.image = UIImage(named:"success-baby")
headerView.contentMode = .scaleAspectFill
let scrollView = UIScrollView(frame: frame)
scrollView.parallaxHeader.view = headerView
scrollView.parallaxHeader.height = 150
scrollView.parallaxHeader.mode = .fill
scrollView.parallaxHeader.minimumHeight = 20
-
The DMScrollViewController is a container with a child view controller that can be added programmatically or using the custom segue DMScrollViewControllerSegue.
-
Please check examples for Swift implementations.
Installation
MXParallaxHeader is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'DMParallaxHeader'
License
DMParallaxHeader is available under the MIT license. See the LICENSE file for more info.