UICollectionView报纸就像布局一样 [英] UICollectionView newspaper like layout

查看:98
本文介绍了UICollectionView报纸就像布局一样的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以弯曲UICollectionView以动态呈现如下所示的界面(Newsify for iPhone)?

Can UICollectionView be flexed to dynamically render interfaces like this one below (Newsify for iPhone)?

或者只能呈现预定义的静态布局?我想基于图像尺寸(hxw)进行布局,比如小图像的小网格和大图像的大网格,所有这些都是在运行时根据我从数据源获得的数据决定的。

Or can only predefined static layouts be rendered? I would want to layout based on the image dimensions (h x w), say small grids for small images and larger ones for big images, all decided at runtime based on the data I get from my datasource.

编辑:有关上述复杂动态布局的任何好教程吗?

Any good tutorials on complicated dynamic layouts like the one above?

推荐答案


可以弯曲UICollectionView以动态渲染接口,如下面的
(Newsify for iPhone)?

Can UICollectionView be flexed to dynamically render interfaces like this one below (Newsify for iPhone)?

是。


有关上述复杂动态布局的任何好教程吗?

Any good tutorials on complicated dynamic layouts like the one above?

在GitHub中有一些不错的,比如:

There are some nice ones in GitHub, like:

  • https://github.com/chiahsien/UICollectionViewWaterfallLayout
  • https://github.com/jayslu/JSPintDemo
  • https://github.com/aceisScope/WaterflowView
  • https://github.com/njdehoog/NHBalancedFlowLayout

从其他地方:

  • http://www.binpress.com/app/pinterest-gridview-for-ios-masonryview/836

Raywenderlich as还有一系列与此相关的帖子:

Raywenderlich as also a serie of posts related to that:

  • http://www.raywenderlich.com/22324/beginning-uicollectionview-in-ios-6-part-12
  • http://www.raywenderlich.com/22417/beginning-uicollectionview-in-ios-6-part-22

这篇关于UICollectionView报纸就像布局一样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆