Consider this question:
Why does my app crash when I tap the background?
The question at first glance seems to be a perfectly acceptable question for Stack Overflow. An experienced Objective-C/iOS developer, however, will take one glance at it and know that there are not quite enough details in the question to give a specific answer to the actual problem.
And the first comment to the question perfectly illustrates the problem:
The code you have shown is unrelated to the crash you have received. The exception tells you that a
resignFirstResponder
message was sent to an instance ofNSCFString
- my guess is that you have assigned a string to your background image instead of a UIImage from the string or something like that. You should show the code where you set the background
The question can be answered with very general advice, but at this point, the question is now basically just a duplicate of any other unrecognized selector sent to instance
question in Objective-C (especially when we don't have in the question the exact section of code that is actually causing the error and can't give specific advice).
And after a string of comments, the discussion regarding the question eventually moves to a chat room. Two comments after the chat invite, we see this comment:
@Zhang gave me a solution in the chat. I'm going to let him post that so he can get some points.
So, they rubber-ducked it out in the chatroom, and that's fine. But is the rest fine? "I'm going to let him post that so he can get some points."
The question is posted in such a way that no one else can possibly answer it with specific detail. The posted and accepted answer points to an unposted method in the user's code which needs to be changed.
So either the question is...
- a duplicate of any other
unrecognized selector
questions and the answer is to follow the general sorts of troubleshooting you do when encountering this exception - unclear what you're asking, because there is NO WAY there's enough detail in the question itself to be able to get to the solution in the accepted answer.
So either the question needs to be closed, or the user needs to add more details into the question (the details that were hashed out in chat/comments) so that the question and answer make more sense to someone else browsing Stack Overflow looking for a solution to a similar problem.