I am creating UITableView with swipe action. I have read many articles. I can do edit and delete action in the TableView. But could not create a design like i posted here. I need increase decrease button action.
I have given small piece of sample code below.
func tableView(_ tableView: UITableView, leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration?
{
let accept = UIContextualAction(style: .normal, title: "accept") { (action, view, nil) in
print("accepted")
}
accept.backgroundColor = .lightGray
accept.image = UIImage(named: "edit")
return UISwipeActionsConfiguration(actions: [accept])
}
Help me to achieve this. Thanks in advance.
Try this method, hope it helps a bit..