完全静态的UICollectionView可能吗? [英] Is completely static UICollectionView possible?

查看:89
本文介绍了完全静态的UICollectionView可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在UITableView上,可以使用完全静态的tableView配置。您可以断开UITableView的数据源,并使用IB将每个单元格放在情节提要(或xib)上。

At UITableView, completely static tableView config is possible. You can disconnect UITableView's datasource and put each cell on storyboard(or xib) by using IB.

我尝试使用UICollectionView进行同样的操作。断开UICollectionView的数据源。将每个单元格放在故事板上的UICollectionView上。我没有任何错误地构建它。但它没有用。根本没有显示单元格。

I tried same thing with UICollectionView. disconnect UICollectionView's datasource. Put each cell on UICollectionView on storyboard. I built it without any errors. But it didin't work. cells were not displayed at all.

UICollectionView是否可能没有数据源?

Is UICollectionView without datasource possible?

推荐答案

否。



不允许创建静态 UICollectionViewController 。您必须拥有数据源委托。

No.

Creating a static UICollectionViewController is not allowed. You must have a data source delegate.

我还想指出,没有静态 UITableView ,但是静态 UITableViewController 。这是一个区别。

I also want to point out that there is not a static UITableView, but a static UITableViewController. It's a difference.

这篇关于完全静态的UICollectionView可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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