i having trouble filling array of customclass.
i try fill jsonfile. during json parsing (using swiftyjson) loop , fill array. problem is, @ end of loop, still empty. tested in different ways, , here code:
that's file problem is. in loop fill annotation, add append array. problem print return. here part of it:
it's small part of huge jsonfile. and, tmpannot.name correctly printed every iteration. when comes array, nothing.
so i'm completly lost , hope me ^^
(and information, here custom class) :
and btw, tried print array.count, , it's nil
im sorry if question has been posted. couldn't find in entire website.
change jsonannotationlist
declaration non-optional , assign empty array
var jsonannotationlist: [ugoannotation] = []
you see, have never created array there nothing printed.
the whole point of optionals use them sparingly, not everywhere.
Comments
Post a Comment