I am currently trying to segue to a different view controller when a button is pressed. The button's action method is called correctly, but when it calls the perform segue with identifier it crashes the app and says "terminating with uncaught exception of type NSException". I have the segue identifier as "switchToMap". I segue to the same page from a different place in the app as well, but that seems to work just fine. Does anyone have any ideas?
func mapButtonPressed (sender: UIButton) {
performSegueWithIdentifier("switchToMap", sender: sender)
}
The other place the map page is segued to looks like this. It is part of a switch statement.
case 2:
performSegueWithIdentifier("map", sender: indexPath.item)