I want to delete cell from the parse server so can anybody tell what should I write under func commiteditingstyle?
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let logCell:UITableViewCell = UITableViewCell(style: UITableViewCellStyle.Subtitle, reuseIdentifier: "Default")
let Log:PFObject = self.LogData.objectAtIndex(indexPath.row) as! PFObject
logCell.textLabel?.text = Log.objectForKey("Weight") as? String
return logCell
}
override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
return true
}
override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
// delete object from parse, remove from list
}
}