title: UISearch Bar in ios 8
body: <p>I am getting JSONArray data and show phone numbers in table<br/>
  I am using UISearchBar in UITableView.</p>
  
  <p>When I am type in search bar it reload data and show type value in first cell.</p>
  
  <p>But i clicked first cell means it show  old array value.<br/></p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
  {
     if (isSearching) 
     {
          cell.textLabel.text = [searchResultArray objectAtIndex:indexPath.row];  
     }
     else 
     {
          cell.textLabel.text = [phoneNoArray objectAtIndex:indexPath.row];
     }
  }
  
  - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText 
  {
     [searchResultArray removeAllObjects];
     if([searchText length] != 0)
     {
          isSearching = YES;
          [self searchTableList];
     }
     else 
     {
          isSearching = NO;
     }
     [self.tableView reloadData];
  }
  
  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
      tempString = [jsonArray objectAtIndex:indexPath.row];
  
  }
  </code></pre>