Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override func tableView(_ tableView: UITableView,
- leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration?
- {
- let weightAction = UIContextualAction(style: .normal, title: "Gewicht", handler: { (ac:UIContextualAction, view:UIView, success:(Bool) -> Void) in
- success(true)
- })
- weightAction.image = UIImage(named: "Scale")
- weightAction.backgroundColor = UIColor(red: 0/255, green: 122/255, blue: 255/255, alpha: 1)
- return UISwipeActionsConfiguration(actions: [weightAction])
- }
- override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
- if segue.identifier == "detailSegue"{
- let rowClicked = (self.tableView.indexPathForSelectedRow?.row)!
- let destVC = segue.destination as! UINavigationController
- let slideVC = destVC.topViewController as! detailViewController
- slideVC.araKuiken = araKuikens[rowClicked]
- }
- }
Add Comment
Please, Sign In to add comment