title: Swift 4 Conversion error - NSAttributedStringKey: Any
body: <p>I converted my app recently and I keep getting the error </p>
  
  <blockquote>
    <p>"Cannot convert value of type '[String : Any]' to expected argument type '[NSAttributedStringKey: Any]?'</p>
  </blockquote>
  
  <p><code>barButtonItem.setTitleTextAttributes(attributes, for: .normal)</code></p>
  
  <p>Whole code:</p>
  
  <pre><code> class func getBarButtonItem(title:String) -&gt; UIBarButtonItem {
      let barButtonItem = UIBarButtonItem.init(title: title, style: .plain, target: nil, action: nil)
      let attributes = [NSAttributedStringKey.font.rawValue:  UIFont(name: "Helvetica-Bold", size: 15.0)!, NSAttributedStringKey.foregroundColor: UIColor.white] as! [String : Any]
      barButtonItem.setTitleTextAttributes(attributes, for: .normal)
  
      return barButtonItem
  }
  </code></pre>