title: How to search in UITableview which have multi section in iOS
body: <p>My <code>UITableView</code> have 2 section are <em>"Local currency"</em> and <em>"All currencies"</em>.</p>
  
  <p>No problem when I search and both section return results. But when I search and return results only within section 2 then no cell in section <em>"All currencies"</em> be displayed. It 's just only display header of <em>"Local currency"</em> with 0 cell.</p>
  
  <p>I want to when I search if which section no have in result then this header of its session will be hidden and just which secion have result will be display header and its content.</p>
  
  <p>This is my code and <code>searchResultsLocal,searchResultsPopular</code> are the two results <code>NSArray</code> when I search:</p>
  
  <pre><code>-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
      //if (searchResultsLocal.count &gt; 0 &amp;&amp; searchResultsPopular.count &gt; 0) {
      //    return 2;
      //}
      return 2;
  }
  
  -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      if (section==0) {
          return [searchResultsLocal count];
      }
      return searchResultsPopular.count;
  }
  </code></pre>
  
  <p>Ay help is appreciable. Thanks in advance.</p>