简体   繁体   English

带有静态单元格的iOS 8 UITableView不可见

[英]iOS 8 UITableView with static cells not visible

I've created this Table View Controller in Storyboard. 我已经在Storyboard中创建了这个Table View Controller。 It look like this and uses UITableViewController . 它看起来像这样,并使用UITableViewController I don't have wired up anything yet, and I don't have written any code that has something to do with that VC. 我还没有连接任何东西,也没有编写任何与该VC有关的代码。 Content is set to Static Cells . 内容设置为“ 静态单元格”

在此处输入图片说明

But if I run the App it looks like this: 但是,如果我运行该应用程序,它将如下所示:

在此处输入图片说明

It seems like the UITableView just disappears. 看来UITableView只是消失了。

If change content to Dynamically the table view is shown (the background is not black but gray). 如果将内容更改为动态显示表格视图 (背景不是黑色而是灰色)。

Any idea what could cause this? 知道是什么原因造成的吗?

I was having the same issue. 我有同样的问题。 The problem is not the static cell but that you connected Navigation Controller with the wrong connection for the root view controller. 问题不是静态单元格,而是您用错误的根视图控制器连接连接了Navigation Controller In my case I connected the Navigation Controller with "push" instead of "root view controller" in Storyboard 's Segue . 就我而言,我在StoryboardSegue中将Navigation Controller“ push”(而不是“ root view controller”)连接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM