Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func prepare(for segue: UIStoryboardSegue, sender: Any?) {
- if segue.identifier == "showDetail" {
- if let indexPath = tableView.indexPathForSelectedRow {
- let object = fetchedResultsController.object(at: indexPath)
- let controller = (segue.destination as! UINavigationController).topViewController as! DetailViewController
- controller.detailItem = object
- controller.navigationItem.leftBarButtonItem = splitViewController?.displayModeButtonItem
- controller.navigationItem.leftItemsSupplementBackButton = true
- }
- }
- }
Add Comment
Please, Sign In to add comment