Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

Parallax implementation inspired by Yahoo Weather and News Digest :)

License

Notifications You must be signed in to change notification settings

michaelhenry/MHYahooParallaxView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MHYahooParallaxView

Parallax implementation control library inspired by Yahoo Weather and News Digest :)

Screenshots

Yahoo Weather Parallax Example

Preview Preview

News Digest Parallax Example (Tsekot.net app - prototype)

Preview

Designed and developed by michaelhenry

How to use

Setup

MHYahooParallaxView * parallaxView = [[MHYahooParallaxView alloc]initWithFrame:CGRectMake(0.0f,0.0f, self.view.frame.size.width, self.view.frame.size.height)];
[parallaxView registerClass:[MHTsekotCell class] forCellWithReuseIdentifier:[MHTsekotCell reuseIdentifier]];
parallaxView.delegate = self;
parallaxView.datasource = self;
[self.view addSubview:parallaxView];

Datasource (MHYahooParallaxViewDatasource)

@required

- (NSInteger) numberOfRowsInParallaxView: (MHYahooParallaxView *)parallaxView;
- (UICollectionViewCell*) parallaxView:(MHYahooParallaxView *)parallaxView cellForRowAtIndexPath:(NSIndexPath *)indexPath;

Delegate (MHYahooParallaxViewDelegate)

@optional
- (void) parallaxViewDidScrollHorizontally:(MHYahooParallaxView *)parallaxView leftIndex:(NSInteger) leftIndex leftImageLeftMargin:(CGFloat) leftImageLeftMargin leftImageWidth:(CGFloat)leftImageWidth rightIndex:(NSInteger)rightIndex rightImageLeftMargin:(CGFloat)rightImageLeftMargin rightImageWidth:(CGFloat) rightImageWidth;

- (void) parallaxViewDidScrollVertically:(MHYahooParallaxView *)parallaxView topIndex:(NSInteger) topIndex topImageTopMargin:(CGFloat) topImageTopMargin topImageHeight:(CGFloat)topImageHeight bottomIndex:(NSInteger)bottomIndex bottomImageTopMargin:(CGFloat)bottomImageTopMargin bottomImageHeight:(CGFloat) bottomImageHeight;

Example

The project has 2 targets that use as demo.

  • Demo for News Digest (Tsekot.net Prototype app)
  • Demo for Yahoo Weather

Please let me know if you have any questions.

Cheers,
Michael Henry Pantaleon

Twitter: @michaelhenry119

Linked in: ken119

http://www.iamkel.net

Licensing

Copyright (c) 2014 Michael Henry Pantaleon (http://www.iamkel.net). All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Parallax implementation inspired by Yahoo Weather and News Digest :)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published