From a80ed5393ae12832f7a49a40c901308bda8e666d Mon Sep 17 00:00:00 2001
From: cramakri <cramakri>
Date: Thu, 1 Nov 2012 17:59:06 +0000
Subject: [PATCH] Working on search bar

SVN: 27467
---
 .../openBIS/openBIS/CISDOBMasterViewController.m     | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/openbis-ipad/openBIS/openBIS/CISDOBMasterViewController.m b/openbis-ipad/openBIS/openBIS/CISDOBMasterViewController.m
index c40039b99c8..a1400af5e84 100644
--- a/openbis-ipad/openBIS/openBIS/CISDOBMasterViewController.m
+++ b/openbis-ipad/openBIS/openBIS/CISDOBMasterViewController.m
@@ -232,13 +232,13 @@
 {
     // TODO Put the controller in search mode
     NSLog(@"searchBarTextDidBeginEditing:");
+    searchBar.showsCancelButton = YES;
 }
 
 - (void)searchBarTextDidEndEditing:(UISearchBar *)searchBar
 {
     // TODO Figure out what to do here
     NSLog(@"searchBarTextDidEndEditing:");
-    [self.searchBar resignFirstResponder];
 }
 
 - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
@@ -250,13 +250,9 @@
 - (void)searchBarCancelButtonClicked:(UISearchBar *) searchBar
 {
     // TODO Take the controller out of search mode
-    NSLog(@"searchBarCancelButtonClicked:");
-}
-
-- (void)searchBarResultsListButtonClicked:(UISearchBar *)searchBar
-{
-    // TODO Figure out what to do here
-    NSLog(@"searchBarResultsListButtonClicked:");
+    searchBar.showsCancelButton = NO;
+    [self.searchBar resignFirstResponder];
+    [self.tableView becomeFirstResponder];
 }
 
 #pragma mark - Server Communication
-- 
GitLab