Popularity
7.8
Stable
Activity
4.2
-
1,391
29
182

Code Quality Rank: L4
Monthly Downloads: 0
Programming language: Objective-C
License: MIT License
Tags: UI    

MXParallaxHeader alternatives and similar libraries

Based on the "UI" category

Do you think we are missing an alternative of MXParallaxHeader or a related project?

Add another 'UI' Library

README

MXParallaxHeader

CI Status Version Carthage compatible License Platform

MXParallaxHeader is a simple header class for UIScrollView.

In addition, MXScrollView 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, MXScrollViewController allows you to add a MXParallaxHeader to any kind of UIViewController.

UIScrollView MXScrollViewController
[Demo](Example-objc/demo1.gif) [Demo](Example-objc/demo2.gif)

Usage

If you want to try it, simply run:

pod try MXParallaxHeader
  • Adding a parallax header to a UIScrollView is straightforward, e.g:

Swift

let headerView = UIImageView()
headerView.image = UIImage(named: "success-baby")
headerView.contentMode = .scaleAspectFit

let scrollView = UIScrollView()
scrollView.parallaxHeader.view = headerView
scrollView.parallaxHeader.height = 150
scrollView.parallaxHeader.mode = .fill
scrollView.parallaxHeader.minimumHeight = 20

Objective-C

UIImageView *headerView = [UIImageView new];
headerView.image = [UIImage imageNamed:@"success-baby"];
headerView.contentMode = UIViewContentModeScaleAspectFill;

UIScrollView *scrollView = [UIScrollView new]; 
scrollView.parallaxHeader.view = headerView;
scrollView.parallaxHeader.height = 150;
scrollView.parallaxHeader.mode = MXParallaxHeaderModeFill;
scrollView.parallaxHeader.minimumHeight = 20;
  • The MXScrollViewController is a container with a child view controller that can be added programmatically or using the custom segue MXScrollViewControllerSegue.

  • Please check examples for ObjC/Swift implementations.

Installation

MXParallaxHeader is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "MXParallaxHeader"

Documentation

Documentation is available through CocoaDocs.

Author

Maxime Epain

Twitter

License

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


*Note that all licence references and agreements mentioned in the MXParallaxHeader README section above are relevant to that project's source code only.