title: index out of bounds swift
body: <p>i can't figure out why my array is out of bounds. i put the feed items into an array "imageArray" and it gives me fatal error heres code</p>
  
  <pre><code>   override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
      let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as! BlogPost
  
      let blogPost: BlogPost = blogPosts[indexPath.row]
      cell.textLabel?.text = blogPost.postTitle
     // cell.textLabel?.text = blogPost.postImageLink
      if cell.postImage?.image == nil {
    //  let cache = ImageLoadingWithCache()
        //  cache.getImage(self.postImageLink,  imageView: cell.postImage, defaultImage: "IMG_0079")}
     if cell.postImage?.image == nil {
  
      dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
  
          // retrieve image from url
          let image = UIImage(data: NSData(contentsOfURL: NSURL(string:self.postImageLink)!)!)
          self.imageArray.append(image!)
          dispatch_async(dispatch_get_main_queue(), { Void in
              // set image in main thread
  
              cell.postImage?.image =  self.imageArray[indexPath.row]
          })
      }
      } else {
              cell.postImage?.image = UIImage(named: "IMG_0079")
          }
  
      }
  
      return cell
  }
  </code></pre>
  
  <p>specifically the error is here </p>
  
  <pre><code> cell.postImage?.image =  self.imageArray[indexPath.row]
  </code></pre>
  
  <p>any ideas?</p>