为 PopoverController 子类化 UITableViewController
我有一个 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在
UIPopoverController
中显示任何类型的UIViewController
。显示 Popover 控制器根本不需要表视图。如果您想显示UITableviewController
,您当然可以。只需将其传递给弹出窗口控制器即可。You can show any kind of
UIViewController
in aUIPopoverController
. A table view is not at all required for displaying a Popover controller. If you want to display aUITableviewController
, you most certainly can. Just pass it in to the popover controller.