diff options
author | Kirill Zhdanovich <kzhdanovich@gmail.com> | 2013-01-05 00:42:58 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:48:20 +0300 |
commit | 03ed68386a37198a1425230b1c9a7beeea47f5e3 (patch) | |
tree | 1ddacf7d7cea937d8f01d63858b177ed55d4c17e | |
parent | 0cd2516954edfe233d6259ebfcaffb00f2c6f99c (diff) |
No result cell is disabled
-rw-r--r-- | iphone/Maps/Classes/SearchVC.mm | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/iphone/Maps/Classes/SearchVC.mm b/iphone/Maps/Classes/SearchVC.mm index 64c77076bf..b84065a1f7 100644 --- a/iphone/Maps/Classes/SearchVC.mm +++ b/iphone/Maps/Classes/SearchVC.mm @@ -378,13 +378,14 @@ static void OnSearchResultCallback(search::Results const & res) //No search results if ([m_searchBar.text length] != 0 && ![[_searchResults objectAtIndex:scopeSection] getCount]) { - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"NoResultsCell"]; - if (cell == nil) - { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"NoResultsCell"] autorelease]; - } + UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"NoResultsCell"]; + if (cell == nil) + { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"NoResultsCell"] autorelease]; + [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; cell.textLabel.text = NSLocalizedString(@"no_search_results_found", nil); - return cell; + } + return cell; } if ([_searchResults objectAtIndex:scopeSection] == nil || realRowIndex >= (NSInteger)[[_searchResults objectAtIndex:scopeSection] getCount]) @@ -486,12 +487,6 @@ static void OnSearchResultCallback(search::Results const & res) [m_table scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:YES]; return; } - //row that says that there is no results - if ([m_searchBar.text length] != 0 && ![[_searchResults objectAtIndex:scopeSection] getCount]) - { - [m_table deselectRowAtIndexPath:indexPath animated:YES]; - return; - } if (realRowIndex < (NSInteger)[[_searchResults objectAtIndex:scopeSection] getCount]) { |