I have a button that when it is clicked, it changes the text of a label. Here is a snippet of my code from my controller module (happydaysViewController.m):
#import "happydaysViewController.h"
@implementation happydaysViewController
-(IBAction)button {
label.text = @"pop tart";
button.image = @"Costa Rican Frog.jpg";
}
So, the label text changes from blank to pop tart, however the background image of the button does not change from blank to Costa Rican Frog.jpg. In fact, I get the following error:
'button' undeclared
Am I approaching this the wrong way?