title: remove the border of uitextfield in uisearchbar
body: <p>I wanna custom the UISearchBar control to a style as showed in the picture below:
  <img src="https://i.stack.imgur.com/WCGGA.png" alt="It&#39;s a customed UISearchBar, there is no boarder for the textfield here."></p>
  
  <p>First I should remove the background view, then  find out the UITextfiled in UISearchBar,  extend the frame of UITextfiled and remove the boarder of it. </p>
  
  <p>Here is my code :</p>
  
  <pre><code>UITextField *searchField;
  
  NSUInteger numViews = [self.subviews count];
  for(int i = 0; i != numViews; i++) {
      if([[self.subviews objectAtIndex:i] isKindOfClass:[UITextField class]]) { //conform?
          searchField = [self.subviews objectAtIndex:i];
      }
  }
  if(!(searchField == nil)) {
  
      [searchField setBorderStyle:UITextBorderStyleNone];
      searchField.frame = self.frame; //modify the frame
  }
  
  [[self.subviews objectAtIndex:0]removeFromSuperview]; //remove the background.
  </code></pre>
  
  <p>The result is the boarder of the UITextField is still there. :(</p>
  
  <p><img src="https://i.stack.imgur.com/b3BrT.png" alt="enter image description here"></p>
  
  <p>My question is :
  1.Why can not I modify the appearance of the UITextField of UISearchBar?</p>
  
  <p>2.How to remove the boarder of UITextfield in UISearchBar.</p>
  
  <p>Thanks very much!</p>