title: Custom searchBar with border
body: <p>Variations of this question have been asked before, but none of the solutions have worked for me. I've made the tableViewHeader the searchBar and this is what I have so far.</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>    override func viewDidLoad() {
      super.viewDidLoad()
      configureSearchBar()
      self.tableView.separatorColor = UIColor(red:0.00, green:0.87, blue:0.39, alpha:1.0)
      // Uncomment the following line to preserve selection between presentations
      // self.clearsSelectionOnViewWillAppear = false
  
      // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
      // self.navigationItem.rightBarButtonItem = self.editButtonItem
  }
  
  func configureSearchBar() {
      searchController.searchBar.delegate = self
      searchController.dimsBackgroundDuringPresentation = false
      searchController.hidesNavigationBarDuringPresentation = false
      searchController.searchBar.placeholder = "Search Companies"
      definesPresentationContext = true
      tableView.tableHeaderView = searchController.searchBar
      searchController.searchBar.barTintColor = UIColor.white
  
      //makes border for search box and gives color and rounded
      //searchController.searchBar.layer.borderColor = UIColor(red:0.00, green:0.87, blue:0.39, alpha:1.0).cgColor
      //searchController.searchBar.layer.borderWidth = 2.0
      //searchController.searchBar.layer.cornerRadius = 15.0
  
  }
  </code></pre>
  
  <p>And I'm trying to build this but so far I have been unsuccessful</p>
  
  <p><strong>What I am trying to build</strong></p>
  
  <p><img src="https://i.stack.imgur.com/XXRHO.png" alt="Screen Shot"></p>
  
  <p>If I try this: </p>
  
  <pre><code>searchController.searchBar.layer.borderColor = UIColor(red:0.00, green:0.87, blue:0.39, alpha:1.0).cgColor
      searchController.searchBar.layer.borderWidth = 1.0
      searchController.searchBar.layer.cornerRadius = 15.0
      searchController.searchBar.clipsToBounds = true
  </code></pre>
  
  <p>It ends up looking like this which is exactly what I am looking for.</p>
  
  <p><strong>What it ends up looking like</strong></p>
  
  <p><img src="https://i.stack.imgur.com/P4XSv.png" alt="Screen Shot"></p>
  
  <p>Thank you for your help in advanced</p>