title: Multiple inheritance from classes 'UIViewController' and 'UISearchBar'
body: <p>I'm working to make an app that will allow someone to enter text into the search bar, and the app will automatically open "<a href="https://www.example.com/" rel="nofollow noreferrer">https://www.example.com/</a> (text from search bar).</p>
  
  <p>I keep getting Failed Builds and an error about Multiple inheritance from classes <code>UIViewController</code> and <code>UISearchBar</code>.</p>
  
  <p>Any Help would be greatly appreciated.</p>
  
  <p>Code below:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController, UISearchBar {
      override func viewDidLoad() {
          super.viewDidLoad()
  
          func searchBarSearchButtonClicked(_ searchBar: UISearchBar)
          {
              searchBar.resignFirstResponder()
              if let url = URL ("https://www.doughnationgifts.com/",doughnationcode)
              let doughnationcode = String(searchBar.text!)
              if #available(iOS 10.0, *)
              {
                  UIApplication.shared.open(URL, options: [:], completionHandler: nil)
              } else {
                  UIApplication.shared.openURL(URL)
              }
          }
      }
  }
  </code></pre>