如何将多个数据添加到数组中

时间:2017-11-22 10:55:12

标签: ios arrays swift uitableview segue

在tableview中选择多个,仅将单个数据添加到列表

如何在数组中添加多个数据?

 override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    if segue.identifier == "toGrafikVC" {
        let giden = segue.destination as! grafikVC
        if let gidenIndexPath = self.tableView.indexPathForSelectedRow {
        giden.GelenDersIDArray.append(dersIDArray[gidenIndexPath.row])
        giden.gelenAd = dersAdiArray[gidenIndexPath.row]

        }
    }
}
@IBAction func kaydetButton(_ sender: UIBarButtonItem) {
    performSegue(withIdentifier: "toGrafikVC", sender: nil)
}

Multiple Select in tableview

Result

0 个答案:

没有答案