Latest1.1.1
Homepagehttps://github.com/bryceredd/RFQuiltLayout
LicenseMIT
Platformsios 6.0, requires ARC
Authors

RFQUILTLAYOUT

RFQuiltLayout is a UICollectionViewLayout subclass, used as the layout object of UICollectionView.

Demo 1
Demo 2

Installation

Add the layout as the subclass of your UICollectionViewLayout.

Subclass the layout

Make sure you set the delegate of the flow layout

- (void) viewDidLoad {
  // ...

  RFQuiltLayout* layout = (id)[self.collectionView collectionViewLayout];
  layout.direction = UICollectionViewScrollDirectionVertical;
  layout.blockPixels = CGSizeMake(100, 100);
}

- (CGSize) blockSizeForItemAtIndexPath:(NSIndexPath *)indexPath {
    if (indexPath.row % 2 == 0)
        return CGSizeMake(2, 1);

    return CGSizeMake(1, 2);
}

(Note: all delegate methods and properties are optional)

Latest podspec

{
    "name": "RFQuiltLayout",
    "version": "1.1.1",
    "license": "MIT",
    "summary": "RFQuiltLayout is a subclass of UICollectionViewLayout that positions various sized cells like a maison laying bricks.",
    "homepage": "https://github.com/bryceredd/RFQuiltLayout",
    "authors": {
        "bryce": "[email protected]"
    },
    "source": {
        "git": "https://github.com/bryceredd/RFQuiltLayout.git",
        "tag": "1.1.1"
    },
    "description": "Lays out cells with various widths and heights on the page.  The cells are positioned in a patch-work layout so each fits next to the other, leaving no extra spaces when possible",
    "source_files": "RFQuiltLayout",
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This