Search code examples
iosswiftxcode10

Receiver has no segue with identifier in self.performSegue(withIdentifier, sender)


I'm getting this follow message when I try open a table item in my 'add' form to update it.

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver () has no segue with identifier 'verBeneficioSegue''

Github with project: https://github.com/felipeejunges/MyBenefits

Segue: enter image description here

My code: enter image description here

When I was debbuging I got error in line 58.

P.S. I'm doing a project exercise for my post-degree in iOS. I try to clean up project, restart Xcode, restart my Mac, but nothing worked.


Solution

  • From the crash the segue is inside vc named ListarBeneficiosTableViewController

    ListarBeneficiosTableViewController: 0x7fbf6d510340>) has no segue with identifier 'verBeneficioSegue'

    and your vc shown in picture is named MyBeneficio ( it's a UITaBarController ) which isn't the same hence the crash

    If your purpose is to add another tab to the tabs controller you should drag the segue from the tab to the listoVC and select viewControllers from the popup

    Otherwise the segue origin should be ListarBeneficiosTableViewController and it's destination is another vc