Mackey18
Mackey18

Reputation: 2352

Creating a segue from a button in an external XIB

I have button on a UITableViewCell designed in an external nib. I was wondering how to create segue to a view on the storyboard editor from this button.

I'm a little new to all this, so if you could explain the process I'd be really grateful.

Upvotes: 1

Views: 1214

Answers (1)

Phillip Mills
Phillip Mills

Reputation: 31016

You can't exactly do that. Assuming the table view that will hold the custom cell is in a view controller within the storyboard, you can create a segue from that controller to the target controller and give the segue a name. Then, when the cell's button is tapped, have it tell its controller to call performSegueWithIdentifier:sender:.

Upvotes: 3

Related Questions