Answer the question
In order to leave comments, you need to log in
Executing a function before the ViewController is loaded?
The point is this. When you click on a cell, a function is executed that saves to UserDefault
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let download = DataData() //DataData class to download data
download.DownloadData(id: id[(indexPath.row)]) // func download data in DataData class
}
Answer the question
In order to leave comments, you need to log in
Because for the transfer of data between controllers using userDefaults, you need to kick.
at you transition is carried out through segue or in didSelectRowAtinex... a method?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question