func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
...
performSegue(withIdentifier: "rowSelected", sender: rowSelected)
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: Any?) {
let rowSelected = sender as! Int
// or you can use indexPathForSelectedRow for getting row value
// let indexPath = self.tableView.indexPathForSelectedRow?
// let rowSelected = indexPath!.row
let destViewController: newController = segue.destination as! newController
newController.rowSelected = rowSelected
}
答案 0 :(得分:2)
您应该添加一个用于处理文件的中间件,因为bodyParser不能使用它们。引自bodyParser的自述文件:
由于它们复杂且通常较大,因此不能处理多部分主体。对于多部分机构,您可能对以下模块感兴趣: