tableview trailingSwipeActionsConfigurationForRowAt crack in ios11

前端 未结 3 697
故里飘歌
故里飘歌 2021-01-19 01:23

I Use trailingSwipeActionsConfigurationForRowAt in IOS11 but when swipe multiple then app cracked.

func tableView(_ tableView: UITableView, trailingSwipeActi         


        
3条回答
  •  轮回少年
    2021-01-19 01:49

    You need to implement tableView(_:editActionsForRowAt:).

    As a minumum, return empty array, but not nil:

    override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
        return []
    }
    

提交回复
热议问题