0
var files = NSMutableArray()
...
for (var i = 0; i < files.count; i++) {
var f = files[i] as [String: AnyObject]
f["selected"] = true
}
當我調試代碼時,f的「selected」屬性設置正確。但文件中的相應元素保持不變。爲什麼?謝謝。枚舉字典組成的數組時,我無法修改字典值
嘗試變種F =文件[I]作爲替代的NSMutableDictionary –