dev
dev

Reputation: 88

How to use TableViewController Class in TableView?

In my App I want to display a TWTRTimelineViewController (TableViewController) in an UIViewController. But the Code for the TWTRTimelineViewController is only working in an UITableViewController Class and not in an UITableView Classe. Is there a way to solve this, for example to display an UITableViewController at a y-postition in an UIViewController? Thanks!

Upvotes: 0

Views: 157

Answers (2)

Ajinkya Patil
Ajinkya Patil

Reputation: 5548

You can not set UITableViewController custom class in UITableView,if the 3rd party class you are using is UITableViewController then you must use it in UITableViewController from storyboard

Upvotes: 1

adolfosrs
adolfosrs

Reputation: 9389

You should create a UIViewController than include a tableView using the storyboard and connect it with the UIViewController (@IBOutlet). Next you will set a identifier to the tableView prototype cell. Than in your UIViewController you will extend the delegates UITableViewDelegate and UITableViewDataSource and implement the protocols.

This tutorial is pretty much detailed and will give you all the steps to achieve what you expect.

Upvotes: 1

Related Questions