Latest 0.2.0
Homepage https://github.com/maxep/MXParallaxBackground
License MIT
Platforms ios 7.0, requires ARC
Authors

CI Status
Version
Carthage compatible
License
Platform

MXParallaxBackground is a simple background class for UIScrolView.

Horizontal Vertical
Demo Demo

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.

  • Adding a parallax background to a UIScrollView is straightforward, e.g:
Swift
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)
Objective-C
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];

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.

Latest podspec

{
    "name": "MXParallaxBackground",
    "version": "0.2.0",
    "summary": "MXParallaxBackground is a simple background class for UIScrolView.",
    "description": "MXParallaxBackground is a simple background class for UIScrolView.nYou can add as many backgrounds as you want with different intensity and direction.",
    "homepage": "https://github.com/maxep/MXParallaxBackground",
    "license": "MIT",
    "authors": {
        "Maxime Epain": "[email protected]"
    },
    "source": {
        "git": "https://github.com/maxep/MXParallaxBackground.git",
        "tag": "0.2.0"
    },
    "social_media_url": "https://twitter.com/MaximeEpain",
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "MXParallaxBackground/**/*"
}

Pin It on Pinterest

Share This