i'am downloading a data with json. and i show them in tableview. i want to send two array to detail table view and show them. but i can give datas on first table view but i canno show details in second table view. i cannot send arrays to detail table view.
///for showing next detailed screen with the downloaded info
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let vc = self.storyboard?.instantiateViewController(withIdentifier: "detailTimetableViewController") as! detailTimetableViewController
vc.classfArr = [classArray[indexPath.row]] //problem is here i think
vc.daysArr = [daysArray[indexPath.row]]
vc.lessonsArr = [lessonsArray[indexPath.row]]
self.navigationController?.pushViewController(vc, animated: true)
}
i've put breakpoint on didSelectRowAt. " vc.classfArr = [classArray[indexPath.row]]" line has a problem. app fail here. could you help me please?
i want to do this genarally; i want to show classes' timetable in first tableview and show timetables detail in second tableview. days must be section in second tableview.