私はplistファイルを持っています。各テキストフィールドやスイッチを書き終えると、値が正しく保存され、テーブルが正しく更新され、情報が正しく反映されます。しかし、私は、画面とリターンを変更すると、私のplistファイルが空で、私はいくつかのオプションをチェックしてください。plistファイルを書くswift
...
let path = NSBundle.mainBundle().pathForResource("perfilBitrubian", ofType: "plist")
descripcionCelda.writeToFile(path!, atomically: false)
または
...
let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true) as NSArray
let documentsDirectory = paths.objectAtIndex(0) as! NSString
let path = documentsDirectory.stringByAppendingPathComponent("perfilBitrubian.plist")
descripcionCelda.writeToFile(path!, atomically: false)
私のリストには、オプションを隠されています。ときに私は非表示と私のテーブルのリフレッシュデータを正しく表示するが、私はプロセスを変更し、フォームを返します。私のplistファイルには情報がありません。
私はこの例を見て、私は何をすべきかわかりません。
http://rebeloper.com/read-write-plist-file-swift/
と、この:
http://www.appcoda.com/expandable-table-view/
ありがとう!
私のチュートリアル(http://rebeloper.com/read-write-plist-file-swift/)がSwift 3.1にアップデートされました。それを見てみましょう。 – Rebeloper