#swift
#swift
Вопрос:
Значок действия прокрутки, даже когда я отбросил его, последнее действие с накоплением всегда находится за пределами экрана. вот мой код:
func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
let leavedetails = UIContextualAction(style: .normal, title: "LEAVE") { (action, view, nil) in
print("leave details")
self.setView(view: self.floatView)
}
leavedetails.image = UIImage(named: "leavedetails")
leavedetails.backgroundColor = UIColor.blue
let approved = UIContextualAction(style: .normal, title: "APPROVE") { (action, view, nil) in
print("approved")
}
approved.image = UIImage(named: "accept")
approved.backgroundColor = UIColor.green
let reject = UIContextualAction(style: .destructive, title: "REJECT") { (action, view, nil) in
print("reject")
}
reject.image = UIImage(named: "reject")
reject.backgroundColor = UIColor.red
let config = UISwipeActionsConfiguration(actions: [approved, leavedetails])
config.performsFirstActionWithFullSwipe = false
return config
}
ссылка на картинку:https://i.stack.imgur.com/MAjMr.png .