You do not really provide much info about your case, but in general the error log:
[__NSCFString setView:]: unrecognized selector sent to instance 0x8292720
means that you are trying to send the setView
message to the wrong object of type NSString
.
Since you say that your code is working in one case, I assume this is not a problem with you sending the message to the wrong object. Rather, this is related to the proper object being deallocated, and its memory reused for an NSString
object (which then receives the message).
I suspect the key might be with how you return back to search results, but you should provide more code for us to understand what is happening.