I thought this would have been easy. When launching the program I had an init method that is supposed to change the Title of a button with SetTitle
It works when I use the code in the method for the button to trigger the event but not on start up? The goal for the night was to have a 'name.txt' file on my website and try to launch the program and have it retrieve the name from the name.txt file.
But I have not gotten that far yet?
Code:
@implementation AppController
- (id)init
{
self = [super init];
if (self) {
[self setNameOfButton];
}
return self;
}
- (void)dealloc
{
[super dealloc];
}
- (IBAction)testButton:(id)sender {
[testButtonNameField setTitle:@"Blah"];
}
-(void)setNameOfButton{
[testButtonNameField setTitle:@"Blah"];
}
@end
It works when I use the code in the method for the button to trigger the event but not on start up? The goal for the night was to have a 'name.txt' file on my website and try to launch the program and have it retrieve the name from the name.txt file.
But I have not gotten that far yet?