gpt4 book ai didi

iphone - 将选项卡添加到 MasterView Controller 项目

转载 作者:行者123 更新时间:2023-11-29 03:54:12 25 4
gpt4 key购买 nike

我使用 tableView 创建了一个 MasterViewController 项目,现在我想向其中添加一些选项卡。我尝试将选项卡栏拖放到 MasterViewController 中并显示选项卡,但它们链接到 tableView 中的最后一个单元格。

有什么方法可以使选项卡保持在原位以便始终显示吗?我想要完成的是让用户按下按钮来组织 tableView 中的数据,因此我愿意接受其他建议。

以下是图片:

enter image description here

enter image description here

最佳答案

您需要让 Controller 成为 UIViewController,而不是 UITableViewController(其中 TableView 是 Controller 的 self.view,并且是全屏的)。如果您使用 UIViewController,您可以添加一个 TableView ,并调整其大小,以便底部有空间来添加选项卡栏。在这种情况下, TableView 和选项卡栏都是 Controller self.view 的 subview 。按照您尝试的方式,选项卡栏将添加到表格的 ScrollView 中。

关于iphone - 将选项卡添加到 MasterView Controller 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16706007/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com