[ios] Clear search results when opening search window

This commit is contained in:
Alex Zolotarev 2014-07-05 14:28:08 +02:00 committed by Alex Zolotarev
parent 08b9ca5162
commit 33656e682f

View file

@ -157,7 +157,8 @@ __weak SearchView * selfPointer;
- (void)setState:(SearchViewState)state animated:(BOOL)animated withCallback:(BOOL)withCallback
{
if (_state == SearchViewStateResults && state == SearchViewStateHidden)
// Clear search results on the map when clear in the search bar on the map is pressed or when we reopen search dialog
if ((_state == SearchViewStateResults && state == SearchViewStateHidden) || state == SearchViewStateFullscreen)
[self clearSearchResultsMode];
UIViewAnimationOptions options = UIViewAnimationOptionCurveEaseInOut;