I am trying to make an app where the user clicks a button and an alert pops up with the text from a textfield in it. But whenever i try, i just get a blank alert. This is my code:
@synthesize label;
@synthesize textBox1;
@synthesize text;
- (IBAction)buttonClick {
UIAlertView *someText = [[UIAlertView alloc] initWithTitle: @"Text from textbox1" message: text delegate: self cancelButtonTitle: @"OK" otherButtonTitles: nil];
[someText show];
[someText release];
text = textBox1.text;
label.text = text;
}
what am i doing wrong it seems like everything is in place like it should be. I think the answer might have something to do with NSLog().