title: appearanceWhenContainedIn in Swift
body: <p>I'm trying to convert my app to the Swift language.</p>
  
  <p>I have this line of code:</p>
  
  <pre><code>[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil]
                       setTitleTextAttributes:textDictionary
                                     forState:UIControlStateNormal];
  </code></pre>
  
  <p>How to convert it to Swift?</p>
  
  <p>In <a href="https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIAppearance_Protocol/index.html#//apple_ref/occ/intfcm/UIAppearance">Apple's docs</a>, there is no such method.</p>