为另一个表视图中的部分设置表视图控制器
我有 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试将 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 thanUITableViewController
) 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 ^^