• This repository has been archived on 04/May/2021
  • Stars
    star
    508
  • Rank 83,916 (Top 2 %)
  • Language
    Objective-C
  • License
    Other
  • Created about 11 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

MosaicLayout using UICollectionViews

MosaicLayout

A layout very similar to MosaicUI that uses Lightbox algorithm described in @vjeux's blog and takes advantage of UICollectionView.

Landscape on iPad

Instructions

  • Import all the files from Libs/MosaicLayout folder.
  • Add a UICollectionView view, change its layout to "Custom" and set its class to "MosaicLayout".
  • Implement UICollectionView's delegates.
  • Implement MosaicLayoutDelegate protocol.

MosaicLayoutDelegate

-(float)collectionView:(UICollectionView *)collectionView relativeHeightForItemAtIndexPath:(NSIndexPath *)indexPath;
-(BOOL)collectionView:(UICollectionView *)collectionView isDoubleColumnAtIndexPath:(NSIndexPath *)indexPath;
-(NSUInteger)numberOfColumnsInCollectionView:(UICollectionView *)collectionView;

Requirements

  • iOS 6
  • ARC

License

This project is under MIT License. See LICENSE file for more information.