In Swift Array
is struct, so when I assign an array to another array of another Object
, the value of this array will be copied to another one.
For example:
class File {
var subFile: [File]?
}
let file = File(file:foo)
file.subFile = otherarray
How can I assign Array type in reference?
Thanks in advance