使用Swift创建iOS应用程序。我遇到了以下似乎无法解决的错误。帮助赞赏。
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath?) -> UITableViewCell {
let cell: HonkHonkTableViewCell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath!) as! HonkHonkTableViewCell
let honkHonk: PFObject = self.timelineData.objectAtIndex(indexPath!.row) as! PFObject
cell.honkTextView.text = honkHonk.objectForKey("content") as! String
var dataFormatter: NSDateFormatter = NSDateFormatter()
dataFormatter.dateFormat = "MM-dd MM:mm"
cell.timeStampLabel.text = dataFormatter.stringFromDate(honkHonk.createdAt!)
var findUser: PFQuery = PFUser.query()!
findUser.whereKey(key: "objectId", equalTo: honkHonk.objectForKey("user")!.objectId)
findUser.findObjectsInBackgroundWithBlock{
(objects:[AnyObject]?, error:NSError?) -> Void in
if error == nil {
let user: PFUser = (objects as! NSArray).lastObject as! PFUser
cell.usernameLabel.text = user.username
}
}
// Configure the cell...
return cell
}
错误: