为 PopoverController 子类化 UITableViewController

发布于 2024-11-15 22:50:30 字数 247 浏览 6 评论 0原文

我有一个 ViewController,它由屏幕上的几个不同视图组成。用于文本数据的滚动视图,用于其他一些数据的 TableView 等。在我的应用程序中,我想添加一个 UIPopOverController 来显示我的数据列表。我当前所在的 ViewController 不是 UITableViewController 的子类。我是否必须在另一个文件中创建 UITableViewController 的单独子类,并在此 ViewController 中使用该类的实例?谢谢。

I have a ViewController that is composed of a few different views on my screen. A scrollView for text data, a TableView for some other data, etc. In my app, I want to add a UIPopOverController to show a list of my data. The current ViewController I am in is not a subclass of UITableViewController. Do I have to create a separate subclass of UITableViewController in another file, and use an instance of that class in this ViewController? Thanks.

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

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

发布评论

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

评论(1

深爱不及久伴 2024-11-22 22:50:30

您可以在 UIPopoverController 中显示任何类型的 UIViewController。显示 Popover 控制器根本不需要表视图。如果您想显示 UITableviewController,您当然可以。只需将其传递给弹出窗口控制器即可。

You can show any kind of UIViewController in a UIPopoverController. A table view is not at all required for displaying a Popover controller. If you want to display a UITableviewController, you most certainly can. Just pass it in to the popover controller.

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