带有静态单元格的 UITableView 不会出现 [英] UITableView with static cells does not appear

查看:33
本文介绍了带有静态单元格的 UITableView 不会出现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Storyboards(选项卡视图模板)创建了一个新的 Xcode 项目.我在我的故事板中添加了几个视图控制器,并希望使用带有静态单元格的 UITableView 作为其中一个.我创建了它,但是当我在模拟器中运行时,单元格没有出现.除了这个故事板文件之外,我没有更改项目中的任何内容.我正在展示故事板编辑器和模拟器运行的屏幕截图.标签显示出来,所以视图加载正确.我将背景颜色设置为灰色,以便我可以看到 talbeview 正在加载.所有单元格都设置为可见.我将它们的样式更改为 Basic 并编辑了标签,并添加了一个披露指示符,仅此而已.

I have created a new Xcode project using Storyboards (tab view template). I added a couple of view controllers to my storyboard, and wanted to use a UITableView with static cells for one. I created it, but when I run in the simulator the cells don't appear. I haven't changed anything in the project except for this storyboard file. I am showing screenshots of the storyboard editor and the simulator running. The label shows up, so the view is loading correctly. I set the background color to gray so I can see the talbeview is loading. All cells are set to visible. I changed their style to Basic and edited the label, and added a disclosure indicator, that's all.

推荐答案

您想尝试使用 TableViewController 而不是通用视图控制器吗?

Do you want to try using the TableViewController rather than the Generic View controller ?

这篇关于带有静态单元格的 UITableView 不会出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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