Multiline NSAttributed String as UIButton Title
<p>My question is similar in theory to this one: <a href="https://stackoverflow.com/questions/17756067/ios-nsattributedstring-on-uibutton">iOS NSAttributedString on UIButton</a></p>

<p>I am looking to make the title of my button read as:</p>

<p>"An underlined string</p>

<p>Some text"</p>

<p>This needs to be done in swift and 100% programmatically.</p>

<p>I am attempting to do this by creating the underlined section using an NSMutableAttributedString and then appending that to the other text (which leads with a newline character). However, that gives me the error "Cannot assign value of type 'Void' ('aka'()') to type 'NSMutableAttributedString"</p>

<p>Code below:</p>

<pre><code>var patientName = NSMutableAttributedString(string:"Patient Name", attributes: underlineAttributes)
var clickforinfomessage = NSMutableAttributedString(string: "\nclick for patient info")
clickforinfomessage = clickforinfomessage.appendAttributedString(patientName)
startVisitButton.setAttributedTitle(clickforinfomessage, forState: .Normal)
</code></pre>