[![enter]圖像描述] [1]] [1]我想將var postKey值傳遞給名爲ExtraViewController的另一個ViewController。第一個var postKey的值需要放在ExtraViewController的var postKey中。這是我迄今爲止。將var從一個類傳遞到ViewController
var postKey = Database.database().reference().childByAutoId().key
let ExtraViewController = storyboard?.instantiateViewControllerWithIdentifier("ExtraViewController") as! ExtraViewController
ExtraViewController.postKey = postKey
Error: Use of unresolved identifier 'storyboard' Error: Expected declaration
仍然有錯誤.. –
錯誤:使用未解析的標識符「故事板」錯誤:預期聲明 –
是的,我已複製並粘貼它 –