RTPagedCollectionViewLayout 0.1.1

RTPagedCollectionViewLayout 0.1.1

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最新发布2016年3月

Ricky Tan 维护。



  • 作者:
  • benfen

使用方法

要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install

使用 Interface Builder

  1. 设置自定义 UICollectionViewLayout

    Custom Layout

  2. 设置参数

    Params

使用 Code

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    CGFloat width = self.view.bounds.size.width;
    RTPagedCollectionViewLayout *layout = [[RTPagedCollectionViewLayout alloc] init];
    layout.columns = 3;
    layout.rows = 2;
    layout.itemSize = CGSizeMake(30, 30);
    UICollectionView *collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, width, 240)
                                                          collectionViewLayout:layout];
    [self.view addSubview:collectionView];
}

屏幕截图

要求

  • iOS 6 及以上

安装

RTPagedCollectionViewLayout 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile

pod "RTPagedCollectionViewLayout"

作者

Ricky Tan, [email protected]

许可证

RTPagedCollectionViewLayout 可在 MIT 许可证下使用。有关更多信息,请参阅 LICENSE 文件。