Latest 0.0.4
Homepage https://github.com/MitchellMalleo/MMScrollPresenter
License MIT
Platforms ios 5.0, requires ARC
Authors

Description

MMScrollPresenter is a control for iOS development that takes an array of MMScrollPages and displays them in your UIScrollView.

I was initially insipired by a control in the Destiny App, so I’d recommend checking that out as well.

Requirements

  • ARC
  • iOS 5.0+

Installation

  1. MMScrollPresenter can be installed via CocoaPods by adding pod 'MMScrollPresenter' to your podfile, or you can manually include MMScrollPresenter.h/.m, MMScrollPage.h/.m, arrow/@2x.png in your app.
  2. Add a UIScrollView into your Interface Builder and under the custom class section, subclass your UIScrollView to MMScrollPresenter.
  3. Now add: @property (nonatomic, weak) IBOutlet MMScrollPresenter *mmScrollPresenter; to your list of properties and dont forget to link it up in your Interface Builder.

Usage

Add a MMScrollPage to the MMScrollPresenter.

UIImageView *mountainImage = [[UIImageView alloc] initWithImage:[UIImage 
    imageNamed:@"mountains.jpg"]];

[mountainImage setFrame:CGRectMake(0, 0, self.mmScrollPresenter.frame.size.width, 
    self.mmScrollPresenter.frame.size.height)];

MMScrollPage *firstPage = [[MMScrollPage alloc] init];
firstPage.titleLabel.text = @"Look a picture of mountains";
firstPage.detailLabel.text = @"I'm the detail text";
[firstPage.backgroundView addSubview:mountainImage];
firstPage.titleBackgroundColor = 
    [UIColor colorWithRed:119/255.0f green:92/255.0f blue:166/255.0f alpha:0.5];

[self.mmScrollPresenter setupViewsWithArray:@[firstPage]];

Contributors

License

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

Latest podspec

{
    "name": "MMScrollPresenter",
    "version": "0.0.4",
    "summary": "iOS Custom UIScrollView Control for paging UIViews",
    "homepage": "https://github.com/MitchellMalleo/MMScrollPresenter",
    "license": "MIT",
    "authors": {
        "Mitch Malleo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/MitchellMalleo/MMScrollPresenter.git",
        "tag": "0.0.4"
    },
    "platforms": {
        "ios": "5.0"
    },
    "requires_arc": true,
    "source_files": [
        "Classes",
        "Classes/**/*.{h,m}"
    ],
    "resources": "Assets/*"
}

Pin It on Pinterest

Share This