不显示带有静态单元格的UITableView [英] UITableView with static cells does not appear

查看:150
本文介绍了不显示带有静态单元格的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而不是Generic View控制器?

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

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

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