0
我想知道如何將以下字典存儲到我的分析儀表板中,存儲用戶在我的應用程序中添加的任何書並再次將數據拉出無論何時用戶需要它。如何將字典存儲到我的分析儀表板中並從中提取數據(Swift 3)
let currentUser = PFUser.current()
var bookInShelf: [String: AnyObject] = [
"book_title" : titleLabel.text as AnyObject,
"book_author" : authorLabel.text as AnyObject,
"book_publisher" : publisherLabel.text as AnyObject,
"book_pages" : numOfPagesLabel.text as AnyObject,
"book_image" : bookImage.image!
]
我測試的代碼bookInShelf["book_title"] = currentUser?["bookTitle"] as AnyObject
,它顯示[Error]: Invalid field name: bookTitle().
是的,這實際上是錯誤的,這就是爲什麼我得到一個錯誤。我不知道它的方式。我需要一個解決方案將書籍的詳細信息,即bookTitle保存到我的分析服務器中。 – acoustickat