TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Jul 2015 |
Maintained by Mitchell Malleo.
MMParallaxPresenter is a UIScrollView that displays text / views with a vertical parallex effect.
pod 'VAProgressCircle'
to your podfile, or you can manually add MMParallaxPage.h/.m
and MMParallaxPresenter.h/.m
into your project.@property (weak, nonatomic) IBOutlet MMParallaxPresenter *mmParallaxPresenter;
to your list of properties and dont forget to link it up in your Interface BuilderAdd a MMParallaxPage to the MMScrollPresenter. To do this, you have three init methods at your disposal. All the default views are shown in the above gif in this order:
- (id)initWithScrollFrame:(CGRect)scrollFrame withHeaderHeight:(int)height
andContentText:(NSString *)contentText;
- (id)initWithScrollFrame:(CGRect)scrollFrame withHeaderHeight:(int)height
withContentText:(NSString *)contentText andContextImage:(UIImage *)image;
- (id)initWithScrollFrame:(CGRect)scrollFrame withHeaderHeight:(int)height
andContentView:(UIView *)contentView;
This shows how to initalize and setup a page and add it to your presenter:
MMParallaxPage *page1 = [[MMParallaxPage alloc]
initWithScrollFrame:self.mmParallaxPresenter.frame
withHeaderHeight:150 andContentText:[self sampleText]];
page1.headerLabel.text = @"Section 1";
[page1.headerView addSubview:[[UIImageView alloc]
initWithImage:[UIImage imageNamed:@"stars.jpeg"]]];
[self.scrollView addParallaxPageArray:@[page1]];
MMParallaxPresenter is available under the MIT license. See the LICENSE file for more info.