New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash on Delete #192
Comments
It crashes because the action fulfill calls |
@Mijail Please submit a PR. |
I can't do it right now, but I think this issue should be open. I will work on it when I can. |
I don’t see this crash occurring in the example mail app. So I am not clear on what the issue is. |
If I recall the example only has 1 section, the way to test it is having more than one. (numberOfSections(in tableView: UITableView) ) |
@Mijail I tried that. Didn't work either. |
I've got the same issue:
func swipeController(_ controller: SwipeController, didDeleteSwipeableAt indexPath: IndexPath) {
collectionView?.deleteItems(at: [indexPath])
}
|
@weakfl Thats not your issue. |
@kurabi Does it matter? FWIW, it's an iOS bug anyway. I was able to work around the issue by using |
I didn't really like the It turns out the crash is triggered by returning @kurabi So it's definetely not an issue of SwipeCellKit (which is is a wonderful library btw). |
Hi. I think the crash happens when didDeleteSwipeableAt is calling deleteRows when there is only one row inside a section. When this is the case, it should call deleteSections |
@weakfl thanks for support. But where should I add CGSize(width: collectionView.bounds.size.width, height: CGFloat.leastNonzeroMagnitude)? |
Depends on your layout. If you're using
That's debatable ;) See @APvanGrootel's comment. |
In my project, I'm getting a crash when I try to delete an item. So I tried with your example with my configuration which is having number of section equals to emails.count and just one row in each section corresponding to the item. Of course I changed indexPath.row by indexPath.section in the right place.
It is possible to delete a row in a section and if it's the last row, delete in the same time the section ?
The text was updated successfully, but these errors were encountered: