I have 28 UIImage objects in my .h file
IBOutlet UIImageView *blackdot0, *blackdot1, *blackdot2, *blackdot3, *blackdot4, *blackdot5, *blackdot6, *blackdot7, *blackdot8, *blackdot9, *blackdot10, *blackdot11, *blackdot12, *blackdot13, *blackdot14, *blackdot15, *blackdot16, *blackdot17, *blackdot18, *blackdot19, *blackdot20, *blackdot21, *blackdot22, *blackdot23, *blackdot24, *blackdot25, *blackdot26, *blackdot27, *blackdot28;
I need to call blackdotx, where x is the number of times a button is clicked, to unhide itself in my .m file
if (clickcount==0) {
blackdot0.hidden = FALSE;
}
else if (clickcount==1){
blackdot1.hidden = FALSE;
}
else if (clickcount==2){
blackdot2.hidden = FALSE;
}
else if (clickcount==3){
blackdot3.hidden = FALSE;
}
Is there a more efficient way to accomplish this and how can I accomplish this? (Using arrays/concatenating strings with integers to call for loops?)