Home

Awesome

MXParallaxBackground

CI Status Version Carthage compatible License Platform

MXParallaxBackground is a simple background class for UIScrolView.

HorizontalVertical
DemoDemo

Usage

If you want to try it, simply run:

pod try MXParallaxBackground

Or clone the repo and run pod install from the Example directory first.

<details open=1> <summary>Swift</summary>
let imageView = UIImageView()
imageView.contentMode = .scaleAspectFill
imageView.image = UIImage(named: "Background")

let background = MXParallaxBackground()
background.view = imageView
background.intensity = 0.75

let scrollView = UIScrollView()
scrollView.add(background)
</details> <details> <summary>Objective-C</summary>
UIImageView *imageView = [UIImageView new];
imageView.contentMode = UIViewContentModeScaleAspectFill;
imageView.image = [UIImage imageNamed:@"Background"];
    
MXParallaxBackground *background = [MXParallaxBackground new];
background.view = imageView;
background.intensity = 0.75;

UIScrollView *scrollView = [UIScrollView new]; 
[scrollView addBackground:background];
</details>

Installation

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

pod "MXParallaxBackground"

Author

Maxime Epain

Twitter

Credits

Images are taken from this tutorial made by Jonathan Nicol.

License

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