I have searchBar and searchDisplayController put in tabbar that is main tabbar.
When I open new viewcontroller by pushing there has no problem.
mainTabbar -> navigationController+searchController -(push after rowdidselect)-> newVC -(push)-> newVC -(push)-> ...
But when I do some present modal.
mainTabbar -> navigationController+searchController -(push after rowdidselect)-> newVC -(modal)-> newVC
Then back to searchResult
mainTabbar -> navigationController+searchController
I can't push newViewController again and got these error:
[__NSCFString setView:]: unrecognized selector sent to instance 0x8292720
what happening to me? all results just tell me about gesturecognizer.
::after I enable zombies I got this message
-[UITapGestureRecognizer retain]:message sent to deallocated instance 0xfcd83b0
I guess the TapGestureRecognizer with in cell of searchDisplayController table is deallocated. Anyone Know How to Retain them???
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.