Swift 4 func prepare(for segue: UIStoryboardSegue, sender: Any?) not updating Int variable with indexPath.row
问题 all! I'm trying to combine previous lessons with the Audio Player, but I'm running into an issue. I have a variable activeSong which is equal to indexPath.row using the method func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) . What happens is that when I print indexPath.row its value is different form activeSong. Any idea why this might be happening. I think I'm doing something wrong with the func prepare(for segue: UIStoryboardSegue, sender: Any?) method. Thanks!