ios - String does not conform to type AnyObject in NSarray Swift -
i creating custom object in swift. 1 of properties of object array, meant contain strings:
exersice (name: "test", type: "test", muscles: nsarray(objects: "muscle1", "muscle2"), descriptionstring: "test", pace: true, sets: 1, reps: nsmutablearray(15, 12, 12), time: false, duration: 0) this part question about:
muscles: nsarray(objects: "muscle1", "muscle2") i keep on getting error:
string not conform type anyobject i don't understand why. looking around on web shows many cases of error, none in context or helpful in solving problem.
how rid of error? highly appreciated
the problem here not nsarray(objects: "muscle1", "muscle2"), this:
nsmutablearray(15, 12, 12) this should be
nsmutablearray(objects: 15, 12, 12) but, @natecook said in answer, should use swift array.
Comments
Post a Comment