title: How to create a class array in Swift
body: <p>In objective c, I could create a class array and use it in a method</p>
  
  <pre><code>NSArray *classes = @[[NSAttributedString class]];
  NSArray *items = [pasteboard readObjectsForClasses:classes
                                             options:nil];
  </code></pre>
  
  <p>However, swift has no "class" function. Returning a Metatype for a class results in an error</p>
  
  <pre><code>    let aClass : AnyClass!  = NSAttributedString.self
      //or let aClass:AnyClass! = NSAttributedString.classForArchiver()
  
      let pasteboard = NSPasteboard.generalPasteboard()
  
      let classes = [aClass]
  
      let objects = pasteboard.readObjectsForClasses(classes, options: nil)
  </code></pre>
  
  <p>the final line results in "fatal error: array element cannot be bridged to Objective-C"</p>
  
  <p>How can I create a class array in Swift?</p>