This code has no errors in it, but when i click the button nothing in the "if" statement works! it doesn't crash or show errors... Btw im working in Xcode on an iphone app.
#import "MainView.h"
@implementation MainView
@synthesize MyButton2, MyMainTextLabel;
@synthesize MyButton3, MyMainTextLabel;
@synthesize MyButton2, Button2Label;
@synthesize MyButton2, Button3Label;
@synthesize MyButton3, Button2Label;
@synthesize MyButton3, Button3Label;
- (IBAction)Button2click {
if(Button2Label.text == @"Hello There!") {
MyMainTextLabel.text = @"\"Hey...!!\"";
Button3Label.text = @"What a rude Penguin!";
Button2Label.text = @"Hows a Goin?";
}
}
- (IBAction)Button3click {
if(Button3Label.text == @"Penguins SUCK!") {
MyMainTextLabel.text = @"\"DONT TEST ME!!\"";
Button3Label.text = @"Oh I Will!";
Button2Label.text = @"Sorry I didnt mean to...";
}
}
- (IBAction)buttonclick {
}
@end