但是,我没有收到第二个视图控制器中的数据......我在这里做错了什么?使用InstantiateViewController传递数据
let storyboard = UIStoryboard(name: "PostSubmit", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "PostSubmitVC") as! PostSubmitViewController {
let nc = UINavigationController(rootViewController: vc)
vc.filteredResult = filteredResult
}
self.present(nc, animated: false, completion: nil)
在通过它之前打印'filteredResult'。也许它是零。 – Sweeper