Today, I encountered a terrible problem,
I used xib to create the button control and connected it. There is no problem, that is, when I click button action during the operation, the system will crash and"
Unrecognized selector sent to instance
". For some reason, I read the code carefully. A: Is it my xib connection wrong?
I got it again, but it still doesn't work. I'm depressed.
I deleted the file and created it. It still doesn't work. What's wrong !!!
Later I found the cause. My controller declared as a local variable during the call, and the system could not find the correct controller.
This is not a pitfall, dizzy, it took an hour to get this thing. But I also learned that I used to write code directly on the interface before. I switched to this header and had a good tool. Instead, I was not used to it.
If you encounter this problem, do not write the controller as a local variable. (Xib is not required)
From the column diqun1314