I tried to pass array to next view controller from my table view..
here is my code this far.
@IBAction func done(_ sender: Any) {
let view = self.storyboard?.instantiateViewController(withIdentifier: "pilihtabel") as! labelpilih
for index in 0 ... (tabelpilihan.indexPathsForSelectedRows?.count)! - 1{
let selectedrow = tabelpilihan.indexPathsForSelectedRows?[index].row
print(pilihan[(tabelpilihan.indexPathsForSelectedRows?[index].row)!])
view.pilih = pilihan[selectedrow!]
}
self.navigationController?.pushViewController(view, animated: true)
}
it works , but only pass the last row i picked.