UICollectionView回退到UIScrollView [英] UICollectionView fall back to UIScrollView

查看:104
本文介绍了UICollectionView回退到UIScrollView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了很多时间实现一个集合视图并将UICollectionViewLayout子类化,只是为了找到iOS 6中的一个错误,如果单元格的大小非常大,则会在滚动时使单元格消失。

I spent so much time implementing a collection view and subclassed UICollectionViewLayout only to find a bug in iOS 6 which makes cells disappear while scrolling if the cell is very large in size.

大型UICollectionViewCell随着自定义而消失布局

到目前为止我无法找到解决方案,但我意识到我可能只能使用UIScrollView而不是UICollectionView而不是需要细胞再利用。有没有一种明显的方法将现有的UICollectionView转换为普通的UIScrollView?当然,我可以从头开始编写自己的UIScrollView子类,但这意味着要再做很多工作。

I am unable to find a solution so far, but I realize I may be able to do with just a UIScrollView instead of a UICollectionView and do not need cell reuse. Is there an obvious way to convert existing UICollectionView to a normal UIScrollView ? Of course, I can write my own UIScrollView subclass from scratch but that would mean a lot of work again.

推荐答案

我使用名为PSTCollectionView的UICollectionView的替代实现解决了我的问题:

I solved my problem using an alternative implementation of UICollectionView called PSTCollectionView :

https://github.com/steipete/PSTCollectionView

这篇关于UICollectionView回退到UIScrollView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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