【发布时间】:2026-01-23 08:00:02
【问题描述】:
一个奇怪的行为:我有几个对象和数组:
for image in images {
for nextID in image.parts {
if nextID.number != 0 {
if let n = primaryLookUp[nextID.number] {
image.parts[0].newID = 0
nextID.newID = 0 // cannot assign!!!
}
}
}
nextID 只是通过 .parts 数组。 ist 是否成为“让”任务,因此我以后无法更改任何内容?
image.parts[0].newID = 0
有效!
【问题讨论】: