title: Remove Border of UISearchBar in iOS7
body: <p>I'm trying to remove border of UISearchBar in iOS 7. In iOS 6 it's working fine. I created the UISearchBar programatically. I tried almost every thing from Stack Overflow and Google.  </p>
  
  <p>SearchBar looking right now<br>
  <img src="https://i.stack.imgur.com/yy6MM.png" alt="SearchBar looking right now"></p>
  
  <p>What i want to achieve<br>
  <img src="https://i.stack.imgur.com/7gvH6.png" alt="What i want to achieve"></p>
  
  <p>I tried all these stuffs mentioned below</p>
  
  <pre><code>searchBar.layer.borderWidth = 1;
  searchBar.layer.borderColor = [[UIColor whiteColor] CGColor];
  </code></pre>
  
  <p>and  </p>
  
  <pre><code>for (id img in searchBar.subviews)
  {       
       if ([img isKindOfClass:NSClassFromString(@"UISearchBarBackground")])
       {     
              [img removeFromSuperview];    
       }
  } 
  </code></pre>
  
  <p>and    </p>
  
  <pre><code>for (UIView *sub in self.tableView.tableHeaderView.subviews) {
      if ([sub isKindOfClass:[UIImageView class]]) {
          sub.hidden = YES;
      }
  }  
  </code></pre>
  
  <p>but still no success.</p>