override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "startAdeventure"{
guard let pageController = segue.destination as? PageController else { return}
pageController.page = Adventure.story
}
}
// passing tableView data without cell for row at index by using prepare for segue
// passing tableView data without cell for row at index by using prepare for segue
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "showDetail"{
guard let pageController = segue.destination as? DetailViewController else { return}
if let indexPath = self.tableView.indexPathForSelectedRow{
pageController.detailText = titleList[indexPath.row] as String
}
}
Sign up here with your email
ConversionConversion EmoticonEmoticon