title: Navigation Bar and Search Controller
body: <p>I want my navbar and search bar to be the same color. I also want to get rid of the hairline between them but that seems a minor issue compared to the first one.
  The navbar attributes are set this way:</p>
  <pre><code>self.navigationController?.navigationBar.barTintColor = ColorHelper.sharedInstance.LightPink()
      if let navBarFont = UIFont(name: &quot;HelveticaNeue-Light&quot;, size: 25.0) {
          let navBarAttributesDictionary: [String: AnyObject]? = [
              NSForegroundColorAttributeName: UIColor.whiteColor(),
              NSFontAttributeName: navBarFont
          ]
          self.navigationController?.navigationBar.titleTextAttributes = navBarAttributesDictionary
   }
  </code></pre>
  <p>The search bar attributes:</p>
  <pre><code>searchController.searchResultsUpdater = self
  searchController.dimsBackgroundDuringPresentation = false
  definesPresentationContext = true
  searchController.searchBar.placeholder = &quot;Search for new friends&quot;
  tableView.tableHeaderView = searchController.searchBar
  searchController.searchBar.backgroundColor = ColorHelper.sharedInstance.LightPink()
  searchController.searchBar.barTintColor = ColorHelper.sharedInstance.LightPink()
  searchController.searchBar.backgroundImage = UIImage()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/QCdX5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QCdX5.png" alt="The result" /></a></p>
  <p>It may seem as my <code>ColorHelper</code> returns different values for <code>LightPink</code> but it doesn´t. I've checked the color HEX-values and it's the navbar that is showing the color improperly, a bit lighter than it actually is. Any ideas why? Altering <code>.barStyle</code> did not change anything.</p>