带有静态单元格的 UITableView 不会出现

编程入门 行业动态 更新时间:2024-10-03 21:27:26
本文介绍了带有静态单元格的 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 不会出现

本文发布于:2023-11-26 09:58:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1633639.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:静态   单元格   UITableView

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!