You can make that table view controller a child view controller of your UIViewController.
In the storyboard, you can do this easily by dragging a container view into your controller's view, and that will give you a child view controller automatically.
You'll want to:
- delete the child view controller it gives you (it's just a UIViewController)
- drag out a table view controller
- control drag from the container view to the table view controller
- choose "embed".
If you need to get a reference to this table view controller from the UIViewController, you can do that in prepareForSegue
-- the table view controller will be the segue's destination view controller, and prepareForSegue
will be called right after the controllers are instantiated.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…