title: Image attachment as first item (left aligned) in NSAttributed string
body: <p>I am trying to add an image to a UILabel using a <code>NSAttributedString</code> with a <code>NSTextAttachment</code></p>
  
  <pre><code>func attributedString(string:String)-&gt;NSAttributedString {
      let label:NSMutableAttributedString = NSMutableAttributedString()
  
      let string = NSAttributedString(string: string)
      let attachment = NSTextAttachment()
      attachment.image = #imageLiteral(resourceName: "WaterIcon")
      let imageString = NSAttributedString(attachment: attachment)
  
      label.append(string)
      label.append(imageString)
  
      return label
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/hPmL2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hPmL2.png" alt="enter image description here"></a></p>
  
  <p>when I switch</p>
  
  <pre><code>    label.append(imageString)
      label.append(string)
  </code></pre>
  
  <p>… which is what I want regarding the order, the image doesn't show up at all :-(</p>
  
  <p>How can I add the image as first item in the string?</p>
  
  <p><a href="https://i.stack.imgur.com/k5rp1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k5rp1.png" alt="enter image description here"></a></p>