title: How do you use setTitleTextAttributes:forState in UIBarItem?
body: <p>How do you use <code>setTitleTextAttributes:forState:</code> in <code>UIBarItem</code> in <code>iOS</code>?</p>
  
  <p>How do you set the <code>NSDictionary</code>? Can't make it work and documentation isn't very clear about that.</p>
  
  <p><strong>From the documentation:</strong></p>
  
  <pre><code>setTitleTextAttributes:forState:
  </code></pre>
  
  <p><strong>Sets the title’s text attributes for a given control state:</strong></p>
  
  <pre><code>- (void)setTitleTextAttributes:(NSDictionary *)attributes 
                        forState:(UIControlState)state
  </code></pre>
  
  <p>Parameters: </p>
  
  <p>attributes: A dictionary containing key-value pairs for text attributes. You can specify the font, text color, text shadow color, and text shadow offset using the keys listed in NSString UIKit Additions Reference. </p>
  
  <p>state: The control state for which you want to set the text attributes for the title.</p>