title: Wrong placement of search text field inside search bar on iOS 11
body: <p>I am using UISearchController as part of navigation bar using the new APIs introduced in iOS 11. I am using it in the following manner in my ViewController's viewDidLoad</p>
  
  <pre><code>- (void)viewDidLoad {  
      [super viewDidLoad];  
      [_table setDataSource:self];  
      [_table setDelegate:self];  
      searchController = [[UISearchController alloc] initWithSearchResultsController:nil];  
      [self.navigationItem setSearchController:searchController];  
      [self.navigationItem setHidesSearchBarWhenScrolling:NO];  
      [searchController.searchBar setBackgroundColor:[UIColor greenColor]];  
  } 
  </code></pre>
  
  <p>However, the search text field is rendered at the wrong position inside the search bar. Look at the following screenshot.</p>
  
  <p><a href="https://imgur.com/a/Igf49" rel="nofollow noreferrer">https://imgur.com/a/Igf49</a></p>
  
  <p>I inspected the view hierarchy and found that UISearchBarTextField object (which is not accessible directly to devs) in the search bar has a frame.y value of 1 which is probably causing this issue. I have tested this on iOS 11 beta 10 and iOS 11 GM.</p>
  
  <p>Is this a known issue? Is there any fix for this? Or is it something I am doing wrong on my end?</p>
  
  <p>Any help will be appreciated (:</p>