title: How to search from a UISearchBar using a URL
body: <p>I'm trying to search directly from the UISearchBar. I'm having problems with this and was wondering if there are any tutorials that cover this or if someone could help. here's my code:</p>
  
  <pre><code>-(void) searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText {
  
      if ([searchText length] == 0) {
          [displayItems removeAllObjects];
  
      } else {
          [displayItems removeAllObjects];
  
          NSString *url=[NSString stringWithFormat:@"http://xml.customweather.com/xml?client=clinique_test&amp;client_password=f@c3$toF&amp;product=search&amp;search=%@",searchBar.text];
          NSURLRequest *request=[NSURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:5.0];
  
          }
      }
  
      // reload the table data
      [self.tableView reloadData];
  } 
  </code></pre>