Im currently using following code to display an array inside of an UItextView / label / textfield :
PFQuery *query = [PFQuery queryWithClassName:@"appMsg"];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (!error) {
// The find succeeded.
NSLog(@"Successfully retrieved %d scores.", objects.count);
// Do something with the found objects
for (PFObject *object in objects) {
NSString *besked = object[@"besked"];
msgRecieved0.text = besked;
NSLog(@"Object values %@",[objects valueForKey:@"besked"]);
}
} else {
// Log details of the failure
NSLog(@"Error: %@ %@", error, [error userInfo]);
}
}];
i have tried to set the NSString to :
NSArray *besked = object[@"besked"];
msgRecieved0.text = besked[0];
msgRecieved1.text = besked[1];
msgRecieved2.text = besked[2];
But again i get an error.
i have tried all i know, and i don't know what i should do to display a "list" of the arrays. I would like to show the first 10 values coming from the array