UICollectionView 是否可以灵活地动态呈现如下所示的界面(Newsify for iPhone)?
或者只能渲染预定义的静态布局?我想根据图像尺寸(高x宽)进行布局,比如小图像的小网格和大图像的大网格,所有这些都是在运行时根据我从数据源获得的数据决定的。
编辑:关于像上面这样的复杂动态布局有什么好的教程吗?
UICollectionView 是否可以灵活地动态呈现界面,例如
下面这个(Newsify for iPhone)?
Yes.
有没有关于像上面这样的复杂动态布局的好教程?
GitHub 上有一些不错的,例如:
- https://github.com/chiahsien/UICollectionViewWaterfallLayout https://github.com/chiahsien/UICollectionViewWaterfallLayout
- https://github.com/jayslu/JSPintDemo https://github.com/jayslu/JSPintDemo
- https://github.com/aceisScope/WaterflowView https://github.com/aceisScope/WaterflowView
- https://github.com/njdehoog/NHBalancedFlowLayout https://github.com/njdehoog/NHBalancedFlowLayout
还有来自其他地方的:
- http://www.binpress.com/app/pinterest-gridview-for-ios-masonryview/836 http://www.binpress.com/app/pinterest-gridview-for-ios-masonryview/836
Raywenderlich 也发布了一系列与此相关的帖子:
- http://www.raywenderlich.com/22324/beginning-uicollectionview-in-ios-6-part-12 http://www.raywenderlich.com/22324/beginning-uicollectionview-in-ios-6-part-12
- http://www.raywenderlich.com/22417/beginning-uicollectionview-in-ios-6-part-22 http://www.raywenderlich.com/22417/beginning-uicollectionview-in-ios-6-part-22
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)