In Xcode 4.3 3, I created a button that generates a popup input box with (buttons Cancel & Enter), works ok, how do I retrieve the data entered and display it in a label or a table?
Here is how the code behind my button looks like.
- (IBAction)car:(UIButton *) sender NSString * title1 = [sender titleForState:UIControlStateNormal]; _mylabel.text = title1; UIAlertView *prompt = [[UIAlertView alloc] initWithTitle:@"Expense Amount in $:" message:@"\n\n" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Enter", nil]; _textField = [[UITextField alloc] initWithFrame:CGRectMake(12, 50, 260, 25)]; [_textField setBackgroundColor:[UIColor whiteColor]]; [_textField setPlaceholder:@"Amount"]; [prompt addSubview:_textField]; _textField.keyboardType = UIKeyboardTypeNumberPad; // show the dialog box [prompt show]; // set cursor and show keyboard [_textField becomeFirstResponder]; } Thank you for your help.