Quote:
Originally Posted by smasher
In general, you want to make an array of your (images / strings,) then pick a random number, then grab that Item from the array.
|
Hi Smasher. Thanks very much for taking time to respond. I am completely new to programming, so not entirely sure how to integrate this into my app. As a placeholder, I had a button writing a text string to a label field (shown below).
Code:
- (IBAction)hello:(id)sender {
helloLabel.text = @"May the Force Be with You";
}
I tried plunking the code you shared into an IBAction in my Controller.m file, substituting the NSLog line for my helloLabel.text line, but couldn't get it to work. I'm sure this is a simple thing to implement, but it is escaping me.
Thanks again for any assistance.