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

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

问题描述

在 UITableView,完全静态的 tableView 配置是可能的.您可以使用 IB 断开 UITableView 的数据源并将每个单元格放在情节提要(或 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天全站免登陆