Latest 0.1.0
License MIT
Platforms ios 7.0, requires ARC
Frameworks UIKit

This repo makes you can diaplay something(always imags) like as below with 9 style according to the amount of the thing(always imags), the number on the view’s top is show as descript info, not a component of the view, the diffirent color region always used to display diffirent images. (类似 nice app 首页列表中图片显示效果的 UI 组件) The mechanism of the view is subclass a UICollectionViewFlowLayout of the UICollectionView and custom some layout algorithms:


  • Using custom UICollectionViewLayout to make the view
  • Support custom height of the view
  • Support custom amount of the color region
  • Works with ARC and iOS >= 7



To integrate BLLSudokuImageLayout into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'BLLSudokuImageLayout'

Then, run the following command:

$ pod install


Just download the repo and copy the Layout directory below the BLLSudokuImageLayout to your project.


The code below will use the BLLCollectionViewImageSudokuLayout class to config the collectionview’s layout.

    BLLCollectionViewImageSudokuLayout *collectionViewImageSudokuLayout = [[BLLCollectionViewImageSudokuLayout alloc] init];
    collectionViewImageSudokuLayout.columnMargin = 2;
    collectionViewImageSudokuLayout.rowMargin = 2;

    //make sure to custom your own width and height of the UICollectionView
    _yourCollectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, yourCustomWidth, yourCustomHeight) collectionViewLayout:collectionViewImageSudokuLayout];
    _yourCollectionView.backgroundColor = [UIColor whiteColor];
    _yourCollectionView.delegate = self;
    _yourCollectionView.dataSource = self;
    [_yourCollectionView registerClass:[BLLImageCollectionViewCell class] forCellWithReuseIdentifier:kImageCellId];

    [self addSubview: _yourCollectionView];


BLLSudokuImageLayout is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

If this code was helpful, I would love to hear from you.

Latest podspec

    "name": "BLLSudokuImageLayout",
    "version": "0.1.0",
    "summary": "A UI component display images with 'sudoku' style like 'nice' app.",
    "description": "A UI component display images with the style like "nice" app. (u7c7bu4f3cu3010niceu3011app u9996u9875u5217u8868u4e2du56feu7247u663eu793au6548u679cu7684 UI u7ec4u4ef6u3011)",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "light_bo": "[email protected]"
    "platforms": {
        "ios": "7.0"
    "source": {
        "git": "",
        "tag": "0.1.0"
    "source_files": "BLLSudokuImageLayoutDemo/BLLSudokuImageLayout/Layout/*",
    "exclude_files": "Classes/Exclude",
    "frameworks": "UIKit",
    "requires_arc": true

Pin It on Pinterest

Share This