添加tableview作为子视图来查看? [英] Add tableview as subview to view?

查看:62
本文介绍了添加tableview作为子视图来查看?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想向界面构建器中的视图添加一个表视图,然后能够从表视图控制器控制该表视图.

I would like to add a table view to a view in interface builder and then be able to control that table view from a table view controller.

我可以毫无问题地用 IB 添加表格,但是如何将表格视图与表格视图控制器链接起来?

I can add the table with IB without any troubles, but how can I link the table view with a table view controller?

推荐答案

在你的 IB 文件中插入 2 个对象:UITableView(作为子视图)和 UITableViewController 子类(作为一个目的).设置 datasourcedelegate 出口,您就可以开始了!:)

In your IB file insert 2 objects: UITableView (as subview) and UITableViewController subclass (as an object). Set datasource and delegate outlets and you are ready to go! :)

这篇关于添加tableview作为子视图来查看?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆