In the code below, I have a dictionary of NSNumbers that are turned into an Array. It is then randomly sorted and the first four rows need to be displayed in the appropriate labels. NSLog does show that the array displays the appropriate numbers. I believe the code fails because I need to convert the NSNumbers into NSStrings. What is the applicable code or what am I overlooking?
-(IBAction)shakeit {
NSDictionary * myExampleDict = [[NSUserDefaults standardUserDefaults] dictionaryForKey:@"dictionaryKey"];
exampleArray = [myExampleDict allValues];
NSUInteger count = [exampleArray count];
for (NSUInteger i = 0; i < count; ++i) {
int nElements = count - i;
int n = (arc4random() % nElements) + i;
[exampleArray exchangeObjectAtIndex:i withObjectAtIndex:n];
}
NSString *one = [exampleArray objectAtIndex:1];
NSString *two = [exampleArray objectAtIndex:2];
NSString *three = [exampleArray objectAtIndex:3];
NSString *four = [exampleArray objectAtIndex:4];
select1.text = one;
select2.text = two;
select3.text = three;
select4.text = four;
}