我们可以在 UICollectionView 的不同部分设置不同的 flowlayout 吗? [英] Can we set different flowlayout in different sections within a UICollectionView?

查看:36
本文介绍了我们可以在 UICollectionView 的不同部分设置不同的 flowlayout 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里是图片说明 http://childhoodgamedev.qiniudn.com/xincheng_demo.png

在section 0中,flowlayout很常见,就像一个网格,在section 1中,flowlayout是圆形的(它们在一个UICollectionView中).

In section 0, the flowlayout is common, like a grid, in section 1, the flowlayout is circular (They are in a UICollectionView).

随着用户的滚动,第一部分是网格布局,第二部分是自定义的更复杂的布局.

With the users' scrolling, the first part is grid flowlayout, the second part is a custom and more complex flowlayout.

我们可以实现吗?如果没有,任何一个好主意?谢谢.

Can we implement this? If not, any one good ideas? Thanks.

推荐答案

看起来 ChildhoodAndy 解决了他的问题,但对于未来的读者来说,这可能是一个使用 UIPageViewControllerTransitionStyleScroll 的 UIPageViewController 的好候选.每个页面都有自己的 UICollectionViewController 以及所需的任何自定义布局.

It looks like ChildhoodAndy solved his problem, but for future readers this is probably a good candidate for a UIPageViewController using UIPageViewControllerTransitionStyleScroll. Each page would be its own UICollectionViewController with whatever custom layout is needed.

这篇关于我们可以在 UICollectionView 的不同部分设置不同的 flowlayout 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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