I've just finished the Apple tutorial on Storyboard and ran the app on my iPhone 4 running iOS 5.1.1.
On the simulator, when I press the add button, I get the modal view that slides up from the bottom, no crash. I can enter data, hit the done button and have my new entry shown.
When performing the same action on my iPhone 4, tapping on the add button results in the app crashing, saying:
* Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named UIStoryboardUnwindSegueTemplate'
This feels like a common problem but no Google results matched the error I am getting.
on your device you said you were running ios 5.1.1. The unwind segue is part of ios 6 and will not work on ios 5.
For ios 5 to dismiss a modal view controller, you need to use the following method:
[self dismissViewControllerAnimated:YES completion:nil];
You should add this to the method in your tutorial where the view is dismissed. If you have a button setup to do an exit segue, then remove the segue line by deleting it in interface builder.
The most common way to call the above dismiss command is from an IBAction. So to add that, just add a UIButton to your storyboard and put a label on it called dismiss. If you know how to connect a button to an IBAction, then do that. If not, you can right click on the button and drag a connection line over to your .m file. It will prompt you for a method name. call it something like dismsisView. It will create the method template. Inside the template, just add the line above.
Hope fully you can follow that and it makes sense.
Of course another way to get it to work, would be to update your phone, but I thought you'd like some help with ios5.
good luck.
来源:https://stackoverflow.com/questions/13628383/storyboard-could-not-instantiate-class-named-uistoryboardunwindseguetemplate-cra