so i have an array, which is a list of of two labels, "helloLabel", and "goodByeLabel" i need to be able to randomly select an object from my array, in this case one of the two labels, and make them become visible, because in interface builder the two labels are checked with HIDDEN please help :[
Code:
blah.h
UILabel *helloLabel;
UILabel *goodByeLabel;
@property (nonatomic, retain) IBOutlet UILabel *helloLabel;
@property (nonatomic, retain) IBOutlet UILabel *goodByeLabel;
-(IBAction)buttonPressed;
@end
blah.m
-(IBAction)buttonPressed {
NSArray *array = [[NSArray alloc] initWithObjects: helloLabel, goodByeLabel, nil];
//* select random object from the NSArray "array"
//*set that random object to *label.hidden = NO;
//* HOW HOW HOW DO I DO THAT
[array release];