Storyboard Could not instantiate class named UIStoryboardUnwindSegueTemplate crash

人盡茶涼 提交于 2019-12-01 06:46:57

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!