UICollectionView invalid number of items crash problem and solution || UITableview invalid number of items crash problem and solution || swipecellKit delete issue
Solution:
If you are delete the row or section before you must have to delete the value from the array that you had used for the tableView or collectionView.
If you are used the swipecellKit must follow the below steps.
You have to implement the below delegate method only.
func collectionView(_ collectionView: UICollectionView, editActionsForItemAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> [SwipeAction]? {
}
Don't implement the below function because it will delete the row immediatly so.Bo of rows or number of section issue will be occur
func collectionView(_ collectionView: UICollectionView, editActionsOptionsForItemAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> SwipeOptions {
If you are delete the row or section before you must have to delete the value from the array that you had used for the tableView or collectionView.
If you are used the swipecellKit must follow the below steps.
You have to implement the below delegate method only.
func collectionView(_ collectionView: UICollectionView, editActionsForItemAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> [SwipeAction]? {
}
Don't implement the below function because it will delete the row immediatly so.Bo of rows or number of section issue will be occur
func collectionView(_ collectionView: UICollectionView, editActionsOptionsForItemAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> SwipeOptions {
}
Comments
Post a Comment