在我的应用程序中,我想在UIViewController中显示TWTRTimelineViewController(TableViewController)。但TWTRTimelineViewController的代码只能在 UITableViewController类中使用,而不能在UITableView Classe中使用。有没有办法解决这个问题,例如显示在 UIViewController 中的y-postition上的UITableViewController? 谢谢!
答案 0 :(得分:1)
您应该使用故事板创建UIViewController
而不是包含tableView,并将其与UIViewController
(@IBOutlet
)连接。接下来,您将为tableView原型单元格设置标识符。在你的UIViewController中,你将扩展代理UITableViewDelegate
和UITableViewDataSource
并实现协议。
This tutorial非常详细,会为您提供实现预期目标的所有步骤。
答案 1 :(得分:1)
你不能在UITableView中设置UITableViewController自定义类,如果你使用的第三方类是UITableViewController,那么你必须在故事板的UITableViewController中使用它