I made 26 buttons, A-Z and when I click them the image of the button I pressed will display in an image view, when I click A, it displays A, When I click B it will display B etc.
The problem I have is that they won't display next to each other, I have 6 image views and I want the first letter to fill first box second letter second box etc.
I just don't know how to do this, I've been trying a lot of ways now and i'm pretty sure i'll need to use arrays just can't get the code right.
This is a picture of where I am now I'm already past number 1 so it's like number 2 except for showing next each other ofc.
hope someone can tell me here is the picture:
http://img213.imageshack.us/img213/4500/questionow.png
thanks
This is what I got now .h
IBOutlet UIImageView *imageview1;
IBOutlet UIImageView *imageview2;
IBOutlet UIImageView *imageview3;
IBOutlet UIImageView *imageview4;
IBOutlet UIImageView *imageview5;
IBOutlet UIImageView *imageview6;
}
-(IBAction)showA;
-(IBAction)showB;
-(IBAction)showC;
-(IBAction)showD;
-(IBAction)showE;
-(IBAction)showF;
-(IBAction)showG;
-(IBAction)showH;
-(IBAction)showI;
-(IBAction)showJ;
-(IBAction)showK;
-(IBAction)showL;
-(IBAction)showM;
-(IBAction)showN;
-(IBAction)showO;
-(IBAction)showP;
-(IBAction)showQ;
-(IBAction)showR;
-(IBAction)showS;
-(IBAction)showT;
-(IBAction)showU;
-(IBAction)showV;
-(IBAction)showW;
-(IBAction)showX;
-(IBAction)showY;
-(IBAction)showZ;
.m
-(IBAction)showA {
UIImage *img = [UIImage imageNamed:@"A.png"];
[imageview1 setImage:img];
}
-(IBAction)showB {
UIImage *img = [UIImage imageNamed:@"B.png"];
[imageview1 setImage:img];
}
Etc.
Hope someone can tell me how to make this or has some sample code for me because I don't quite get the arrays even after seeing a lot of tutorials on them.
thanks Don