gewusst wie: löschen von Zeilen-von coredata (Entity) ios swift

ich bin neu auf KERN-DATEN in meiner app bin ich mit coredata.
ich habe gerade gespeicherten Daten im core data. meine entity-name ist "FEED" und ich habe die Zeilen mit den Namen "title", "id" , "Links" ,"desc" so, jetzt will ich löschen, besonders Zeile an, basierend auf "id". also, wie kann ich dies tun?

Hier ist mein code,

func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
    let cell : MessageMusicCell = tableView.dequeueReusableCellWithIdentifier("MessageMusicCell") as! MessageMusicCell

    cell.pinButton.tag = indexPath.row
    cell.pinButton.addTarget(self, action: #selector(MessageViewController.buttonDeletePressed(_:)), forControlEvents: UIControlEvents.TouchUpInside)
    cell.selectionStyle = .None



        person = people[indexPath.row]
        cell.lbl_title_msg_music.text = person!.valueForKey("title") as? String
        cell.img_message_music.image = UIImage(named: "PlaceHolder")
        cell.desc_msg_music.text = person!.valueForKey("desc") as? String


    return cell
}

func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {

        print(people.count)
        return people.count


}

func buttonDeletePressed(sender:UIButton) {


}
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {

    let cell : MessageMusicCell = tableView.dequeueReusableCellWithIdentifier("MessageMusicCell") as! MessageMusicCell


}

also, wie kann ich dies tun?

InformationsquelleAutor Jack.Right | 2016-06-01
Schreibe einen Kommentar