EXC_BAD_INSTRUCTION error

孤人 提交于 2019-12-02 09:28:47

If your error is like this

Then it is because you have not hooked up your outlets, to do this go into the storyboard / nib and hook it up like so:

Make sure they are valid by seeing the circles become solid:

This code works for me. I tested it on my own. This is mostly an outlet error, if they aren't connected correctly. It could also be that you have removed an outlet from your code and still have it connected inside your storyboard.

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