带有表 RTE 的故事板在 NIB 中缺少表视图

发布于 2024-12-28 07:33:22 字数 607 浏览 3 评论 0原文

我刚刚更新到最新的 XCode 和 IOS 5...我以前做的事情现在似乎不起作用了。

在故事板的“XIB”上,我有一个 UIViewController。在其下放置一个 View,在其下放置一个 UITableView。

我右键单击并将数据源和委托附加到上面提到的顶级 UITableViewController 。在“旧”方式中,我使用仅使用 XIB 文件将这些文件附加到文件所有者。

然后我创建一个名为 myTable 的 IBOutlet 并将该表附加到该插座。

在此版本的 XCode 之前,这就是我需要做的所有事情,然后我就可以编写代码了。

现在,即使我在应用程序启动时执行了上述所有操作,它仍表示 XIB 缺少 UITableView。

所以我重新开始并取出了 UIView。所以现在我有一个 UIViewController 和它下面的 UITableView 。现在应用程序可以运行了。似乎我添加的参考文献使用这个简单的笔尖并不重要。这很好,但我需要在 UIView 中添加其他对象。

希望这不会太令人困惑!我需要知道的是,当我在故事板上创建笔尖,然后添加视图,然后添加表格时,需要什么引用或插座或任何它想要的东西,以便应用程序能够运行?

感谢您的帮助!

I just updated to the latest XCode and IOS 5... Things I used to do don't seem to work now.

On the "XIB" on the storyboard I have a UIViewController. Under that I put a View and under that I put a UITableView.

I right click and attach the datasource and delegate to the top level UITableViewController mentioned above. On the "old" way with just a XIB file I used to attach these to FILES OWNER.

Then I make an IBOutlet named myTable and attach the table to that outlet.

Prior to this version of XCode that is all I needed to do and then I was able to do the code.

Now even though I do all of above when the app starts it says the XIB is missing the UITableView.

So I started over and took out the UIView. So now I have a UIViewController and the UITableView under that. And now the app works. It seems as though references I add do not matter using this simple nib. This would be good but I need to add other object at the UIView.

Hope this wasnt too confusing! What I need to know is when I create the nib on the storyboard, then add the view and then the table, what references or outlets or whatever it wants so the app will run?

thanks for any help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

安人多梦 2025-01-04 07:33:22

查看有关故事板的两个教程:
故事板教程第 1 部分
故事板教程第 2 部分

Check out this two tutorials on storyboards:
Storyboards tutorial part 1
Storyboards tutorial part 2

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文