title: Programmatically change title of UIButton whose title was set in IB as attributed
body: <p>I have changed titles of <code>UIButton</code>s before using:</p>
  
  <pre><code>- (void)setTitle:(NSString *)title forState:(UIControlState)state
  </code></pre>
  
  <p>But <a href="/questions/9035246/center-multi-line-text-on-uibutton-using-ib/12619237#12619237">I've run into a situation</a> where the <code>UIButton</code> I'm using has a mult-line title and will only center the text properly if changed from "plain" to "attributed" in IB. When the title is changed in this way, the usual <code>setTitle: forState:</code> method no longer updates the button.</p>
  
  <p>How do you make changes to an <strong>attributed</strong> title of a <code>UIButton</code>?</p>
  
  <p>To clarify, so you don't assume I'm just making a stupid mistake, I've used the debugger to peek at the properties of the <code>UIButton</code> and logging the output of</p>
  
  <pre><code>- (NSString *)titleForState:(UIControlState)state
  </code></pre>
  
  <p>after using</p>
  
  <pre><code>- (void)setTitle:(NSString *)title forState:(UIControlState)state
  </code></pre>
  
  <p>to set it returns the value just set. Problem is it doesn't change the appearance of the button as long as the title is set to <strong>attributed</strong> in IB. My code works fine by simply changing this to <strong>plain</strong>. But this is not a solution as described in the link above.</p>