commitEditingStyle delete button won't show

By : Akhu
Source: Stackoverflow.com
Question!

I have an insane issue. I want to implement in my app the "swipe to delete" in my UITableView in Swift.

Something really easy, the swipe works fine, but never showing my red Delete button.

func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
    // If a row could not be edited we have to return false for the row index
    return true
}

func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {

}

I have tested this on 3 new project, when I code theses functions myself, the button never shows, I don't know why!

I have downloaded his code to be sure, and his code works fine, I have the delete button.

My TableView works fine, no bug, no issue, debugger tells me nothing useful. I'm lost! Is this a bug from Xcode? Here a screen My issue and what I want : Yay

Do you guys have any idea ?

By : Akhu


Answers

Sorry for the wasted time guys, I had the same issue as here :

Monotouch "Swipe To Delete" CommitEditingStyle Not Firing

My table view was larger than the screen scope... So my button was here but I could not see it!

Thanks for your kind help ! facepalm

By : Akhu


This video can help you solving your question :)
By: admin