I have a Xib file with a button. I want to segue to another view controller when the button is clicked. I've created a segue between the view controllers in StoryBoard and created an identifier, but can't seem to call it programatically.
@IBAction func buttonAction(sender: UIButton)
{
self.performSegueWithIdentifier("SegueToPostDetail", sender: sender)
}
Xcode error is "....has no member 'performSequeWithIdentifier'
Thanks!
You can't call performSegueWithIdentifier in a Xib class, only in a UIViewController class. So you have 2 solutions:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With