title: [AnyObject]?' does not have a member named 'subscript'
body: <p>I'm loading a list of objects from a core data database into a table view.</p>
  
  <pre><code>class ScheduleViewController: UITableViewController {
  
      private var items: [AnyObject]?
  
      // MARK: - Table view data source
      override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          if let itemCount = items?.count {
              return itemCount
          }
      }
  
      override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCellWithIdentifier("DayScheduleCell", forIndexPath: indexPath) as DayScheduleCell
  
          if let act = items[indexPath.row] as Activity {
              if act.client != nil {
                  // ...
              }
          }
  
          return cell
      }
  }
  </code></pre>
  
  <p>The data is retrieved inside a closure so I have declared an <code>items</code> array as an optional because it might be nil in the first run.</p>
  
  <p>I'm getting the error <strong>'[AnyObject]?' does not have a member named 'subscript'</strong> at this line <code>if let act = items[indexPath.row] as? Activity</code>.</p>
  
  <p>I can't figure out how to resolve this.</p>