title: WKWebView best way to check if URL has SSL and show lock-icon beneath url in text field
body: <p>I'm trying to make an app kinda like Safari, where if a domain has SSL-encryption, it should make this clear for the user by setting the host url to a green color.</p>
  
  <p>However, is there a built-in method for checking this, or should I just check for a prefix https?</p>
  
  <p>I can do this with the following code, but is there a better way? Can you also tell me how I can display the Lock icon to the left of the text? (Not as an image, but label with font icon type)</p>
  
  <pre><code>// Check if host has SSL-encryption and display secure lock to notify user
      if (navigationAction.request.mainDocumentURL?.absoluteString.hasPrefix("https://"))!{
          textFieldURL.textColor = #colorLiteral(red: 0.4666666687, green: 0.7647058964, blue: 0.2666666806, alpha: 1)
      }else{
          textFieldURL.textColor = #colorLiteral(red: 0, green: 0, blue: 0, alpha: 1)
      }
  </code></pre>