这是我的objectArray:
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [[10 thousand points]...]
},
"properties": {
"name": "Dinagat Islands"
}
}
空的CoreData数组:
var wordArray:[Word] = [
Word(word: "abacus", pronounce: "ˋæbəkəs", translate: "算盤", image: "abacus.jpg", visited: false),
Word(word: "abbey", pronounce: "ˋæbɪ", translate: "修道院", image: "abbey.jpg", visited: false),
Word(word: "ache", pronounce: "ek", translate: "痛", image: "ache.jpg", visited: false)
]
选择并存储功能:
var words:[WordMO] = []
答案 0 :(得分:1)
移动
var word:WordMO!
word = WordMO(context: getContext())
进入你的for循环