Neko Neko - 2 months ago 22
Swift Question

Unable lazy load in swift

I want lazy loading an array in swift , and here is my code:

enter image description here
the compiler gave me a strange error,it says I pass an closure to an array ,but I returned a [[[String:String]]] right?

can someone tell me where goes wrong?

Answer Source
lazy var plistArray: [[[...]]]? = { ... }()

I think you need () right next to }.