嗨我继续收到此错误 EXC_BAD_BREAKPOINT_INSTRUCTION(代码= EXC_I386_INVOP,子代码= 0x0) ,我似乎无法解决它,问题出在代码的结尾,它表示customcell.itemdetails.text = object [" description"] as String!感谢
import UIKit
class TableViewController: PFQueryTableViewController {
// Initialise the PFQueryTable tableview
override init!(style: UITableViewStyle, className: String!) {
super.init(style: style, className: className)
}
required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
// Configure the PFQueryTableView
self.parseClassName = "Photo"
self.textKey = "updatedAt"
self.pullToRefreshEnabled = true
self.paginationEnabled = false
}
// Define the query that will provide the data for the table view
override func queryForTable() -> PFQuery! {
var query = PFQuery(className: "Photo")
query.orderByAscending("updatedAt")
return query
}
//override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath, object: PFObject) -> PFTableViewCell {
var customcell = tableView.dequeueReusableCellWithIdentifier("Cell") as CustomCell!
if customcell == nil {
customcell = CustomCell(style: UITableViewCellStyle.Default, reuseIdentifier: "Cell")
}
// Extract values from the PFObject to display in the table cell
customcell.itemdetails.text = object["description"] as String!
customcell.user.text = object["User"] as String!
customcell.price.text = object["Price"] as String!
var thumbnail = object["Image"] as PFFile
var initialThumbnail = UIImage(named: "question")
customcell.productimage.image = initialThumbnail
customcell.productimage.file = thumbnail
customcell.productimage.loadInBackground()
return customcell
}
}

这是自定义单元格中的代码
import UIKit
class CustomCell: PFTableViewCell {
@IBOutlet weak var user: UILabel!
@IBOutlet weak var productimage: PFImageView!
@IBOutlet weak var itemdetails: UITextView!
@IBOutlet weak var price: UILabel!
}