Search code examples
swiftseguesigabrt

segue code crashes after all tasks are done?


I am doing this for an online class. The code seems to be the same as the instructor’s, which is working in their video. Yet, every time I run it, it updates the text field in the second view controller, then crashes. All this app is supposed to do is take an input in the text box on the first screen and display it in the label on the second screen after the user presses the “button” button.

Here’s the link to the entire file (it’s a very simple program).

https://drive.google.com/open?id=1Cn2OD18vdy7OoQ6bRWjK-Fq2MPaMVc1v


Solution

  • You have attached something and removed it from viewcontroller. That's why storyboard was looking for reference of it. You have to remove that reference from storyboard also, Please have a look in this screenshot. Remove warning sign variable and run your application. enter image description here