Uploading Strings in an array of labels to parse

156 Views Asked by At

I have an application with a lot of labels on it indicating numbers that the user chooses. These numbers are displayed in labels. The main goal of the app is to upload those numbers in an array to Parse.

I'd like some help on which road I should take. I was thinking of an array of Labels but would I be able to upload the String of the label?

Please be thorough in your explanation. Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

Yup pretty simple. I would look into Relations. See their guide here

But if you want it as an array for that user here is how you would do that: https://parse.com/docs/ios/guide#relations-using-an-array

Copy/Paste:

OBJ C

// let's say we have an author
PFObject *author = ...

// and let's also say we have an book
PFObject *book = ...

// add the author to the authors list for the book
[book addObject:author forKey:@"authors"];

SWIFT

// let's say we have an author
let author = ...

// and let's also say we have an book
let book = ...

// add the author to the authors list for the book
book.addObject(author, forKey: "authors")

Pretty straight forward. When in doubt, check the docs. As my saying goes, "Docs know it all"