RAMCollectionViewFlemishBondLayout 1.1.1

RAMCollectionViewFlemishBondLayout 1.1.1

测试已测试
语言语言 Obj-CObjective C
许可协议 MIT
发布最后发布2014年12月

Rafael 维护。



  • Rafael Aguilar Martin

介绍

RAMCollectionViewFlemishBondLayoutRafael AguilarCrows & Dogs 编写。

RAMCollectionViewFlemishBondLayout 是一个 UICollectionViewLayout 的子类,用于以组的形式显示单元格(突出显示其中一个),可选的头部/尾部视图,并支持多个区域。突出显示的单元格占据大部分空间,剩余的单元格平均分配空间。请查看示例屏幕截图以了解其外观。

屏幕截图

Screenshot 1

Screenshot 2

用法

设置说明

Podfile

pod 'RAMCollectionViewFlemishBondLayout', '~> 1.1.1'

手动

RAMCollectionViewFlemishBondLayout 文件夹添加到您的项目中。

示例

self.collectionViewLayout = [[RAMCollectionViewFlemishBondLayout alloc] init];
self.collectionView.collectionViewLayout = self.collectionViewLayout;

属性

  • numberOfElements: 要分组的单元格数量(默认:3)。
  • highlightedCellWidth: 突出显示单元格的宽度。
  • highlightedCellHeight: 突出显示单元格的高度。

RAMCollectionViewFlemishBondLayoutDelegate

这些都是可选的。

  • collectionView:layout:highlightedCellDirectionForGroup:atIndexPath:: 请求代理在特别组的突出显示单元格的方向。可用的值:RAMCollectionViewFlemishBondLayoutGroupDirectionLeftRAMCollectionViewFlemishBondLayoutGroupDirectionRight
  • collectionView:layout:estimatedSizeForHeaderInSection:: 请求代理在指定区域中头部视图的大小。
  • collectionView:layout:estimatedSizeForFooterInSection:: 请求代理在指定区域中尾部视图的大小。

任务列表

  • 粘性头部
  • 添加项目间距

要求

需要 iOS 6.0+ 和 ARC。

贡献

欢迎关注、提交补丁和提供反馈。 我只希望知道您是否在其项目中使用它。

MIT 许可证

This code is distributed under the terms and conditions of the MIT license.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.