|
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if let button:UIButton = sender as? UIButton { // Abfrage, welcher Schalter: Übergabe der Stadt if button==bnedit { if let indexPath = tableview.indexPathForSelectedRow { let city:City = cities[indexPath.row] if let dest = segue.destination as? InputViewController { dest.city=city } } } // edit } // if } // prepare
// Rücksprung vom ChangeViewController Abbruch @IBAction func unwindCancel(_ segue:UIStoryboardSegue) { // keine Aktion notwendig } // unwindToEditViewCancel
// Rücksprung vom ChangeViewController Save @IBAction func unwindOk(_ segue:UIStoryboardSegue) { if let src = segue.source as? InputViewController { if let indexPath = tableview.indexPathForSelectedRow { let citytable:City = cities[indexPath.row] citytable.initCity(city) tableview.reloadRows(at: [indexPath], with: UITableView.RowAnimation.right) }
} // unwindOk
|
|