Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Zhdanovich <kzhdanovich@gmail.com>2013-01-05 00:42:58 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:48:20 +0300
commit03ed68386a37198a1425230b1c9a7beeea47f5e3 (patch)
tree1ddacf7d7cea937d8f01d63858b177ed55d4c17e
parent0cd2516954edfe233d6259ebfcaffb00f2c6f99c (diff)
No result cell is disabled
-rw-r--r--iphone/Maps/Classes/SearchVC.mm19
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])
{