I've made a bunch of UIButtons in a grid and I want to be able to iterate over them easily so I've put them in an NSMutableArray.
Like so:
// in .h
UIButton* button1; UIButton* button2; ... UIButton* button9;
UIButton* myButtons[3][3];
// in init function in app
myButtons[0][0] = button1; myButtons[0][1] = button2; ... myButtons[2][2] = button9;
But now if I try to access the title of a button in myButtons I get nil:
// elsewhere in app [button1 setTitle:@"A" forState:UIControlStateNormal];
// and then: NSLog(@"currentTitle of button1: %@", (myButtons[0][0]).currentTitle); // -> (null)
Anybody know what's going on? Thanks!