https://github.com/betzerra/MosaicLayout
MosaicLayout using UICollectionViews
https://github.com/betzerra/MosaicLayout
Last synced: 5 months ago
JSON representation
MosaicLayout using UICollectionViews
- Host: GitHub
- URL: https://github.com/betzerra/MosaicLayout
- Owner: betzerra
- License: other
- Archived: true
- Created: 2013-02-17T02:26:08.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-04-18T14:53:50.000Z (almost 8 years ago)
- Last Synced: 2024-08-01T22:48:01.886Z (9 months ago)
- Language: Objective-C
- Size: 2.39 MB
- Stars: 508
- Watchers: 16
- Forks: 73
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cocoa - MosaicLayout
README
# MosaicLayout
A layout very similar to [MosaicUI](https://github.com/betzerra/MosaicUI) that uses **Lightbox algorithm** described in @vjeux's blog and takes advantage of **UICollectionView**.
## 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
```objc
-(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.