为另一个表视图中的部分设置表视图控制器

发布于 2024-12-19 13:05:52 字数 226 浏览 5 评论 0原文

我有 FirstViewController (继承自 UITableViewController),并且我想显示 SecondViewController (也继承自 UITableViewController)在 FirstViewController 的第一部分。

有办法做到这一点吗?

I have FirstViewController (inherits from UITableViewController), and I want to show the SecondViewController (also inherits from UITableViewController) in the first section of FirstViewController.

Is there a way to do this?

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

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

发布评论

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

评论(1

予囚 2024-12-26 13:05:52

您可以尝试将 SecondViewController.view 放入 FirstViewController 的第一部分/行的 UITableViewCell 中。

但也许最好的解决方案是创建 UITableView 的子类(不仅仅是 UITableViewController)并执行相同的操作,或者将其添加到 FirstViewController 的 headerView 中嗯>。

对于代码部分,请尝试一些操作,如果您有问题或更精确的问题,请回来:-)

无论如何,它应该可以工作^^

You could try to put the SecondViewController.view inside the UITableViewCell of the first section/row of your FirstViewController.

But maybe the best solution is to create a subclass of UITableView (more than UITableViewController) and do the same, or add it to the headerView of your FirstViewController.

For the code part, try something and come back if you have a problem or more precise question :-)

Anyway, it should works ^^

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