title: Swift alternative to performSelectorOnMainThread
body: <p>I want to reload my table data inside a block in this method:</p>
  
  <pre><code>import UIKit
  import AssetsLibrary
  
  class AlbumsTableViewController: UITableViewController {
  
      var albums:ALAssetsGroup[] = []
  
      func loadAlbums(){
          let library = IAAssetsLibraryDefaultInstance
  
          library.enumerateGroupsWithTypes(ALAssetsGroupType(ALAssetsGroupAll),
              usingBlock: {(group, stop) in
                  if group {
                      self.albums.append(group)
                  }
                  else {
                      dispatch_async(dispatch_get_main_queue(), {
  
                          self.tableView.reloadData()
  
                      })
                  }
              }, failureBlock: { (error:NSError!) in println("Problem loading albums: \(error)") })
  
      }
  
      override func viewDidLoad() {
          super.viewDidLoad()
          loadAlbums()
  
          // Uncomment the following line to preserve selection between presentations
          // self.clearsSelectionOnViewWillAppear = false
  
          // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
          //self.navigationItem.rightBarButtonItem = self.editButtonItem
      }
  </code></pre>
  
  <p>But the else block will not execute. The error I get is:</p>
  
  <pre><code>'performSelectorOnMainThread' is unavailable: 'performSelector' methods are unavailable
  </code></pre>
  
  <p>So what is the alternative to <code>'performSelectorOnMainThread'</code> in swift?</p>
  
  <p>UPDATE:</p>
  
  <p>I am now getting an abort error.</p>