i have a model (core data) set up, called Animals. i have to access this in a specific order and to do so i use the code listed below. what am i supposed to type instead of the XXXXXXXXX in the for loop?
NSSortDescriptor *sort = [NSSortDescriptor sortDescriptorWithKey:@"order" ascending:YES];
NSArray *sortedArray = [animalscontroller.arrangedObjects sortedArrayUsingDescriptors:[NSArray arrayWithObject:sort]];
for (XXXXXXXX *a in sortedArray)
{
...........
}
i have been told that i have to put the name of the model, so in this case "Animals" but that gives me an error saying that the variable Animals is not declared. i am pretty green on cocoa programming.
thank you
Best regards
Igor