Reputation: 707
I would like to add a button on navigation bar of a UITableViewController that will segue to a new UIViewController.
Control-dragging a button from one VC to a new VC (VC-A to VC-B) works perfectly, even providing a button on VC-B's navigation bar to return to VC-A.
However, putting a button on the navigation bar of a Table VC, then control-dragging it to the new VC (TVC-C to VC-D), appears to do the same thing, providing the return button on VC-D in storyboard, but when I run it, it does not open VC-D.
I noticed that putting a button on the Table View's navigation bar turns it into a Bar Button, whereas placing one on a VC does not. Does this have something to do with it? How do I get around that?
(Using XCode 10, Swift 4)
Upvotes: 0
Views: 79
Reputation: 707
Instead of a Table View Controller, I used a TableView on a View Controller.
Upvotes: 1