Okay, so i’m trying to give 7 different labels names using an array and a for loop.
Code:
id huller[] = {hul18.text, hul17.text, hul16.text, hul15.text, hul14.text, hul13.text, hul12.text, hul11.text, hul10.text, hul9.text, hul8.text, hul7.text, hul6.text, hul5.text, hul4.text, hul3.text, hul2.text, hul1.text};
for (int i = 0; 7 > i; i++) {
huller[i] = [NSString stringWithFormat:@"%i", x + 1];
NSLog(@"%@", huller[i]);
}
The name change in the NSLog, but they do not change in the simulator. What is wrong?
Assuming hul18, hul17, etc. are all UILabel objects, then do this: