UIAlertView* find = [[UIAlertView alloc] init]; [find setDelegate:self]; [find setTitle:@"Find"]; [find addButtonWithTitle:@"Cancel"]; [find addButtonWithTitle:@"Find & Bring"]; [find addButtonWithTitle:@"Find & Go"]; [find addButtonWithTitle:@"Go To Next"]; [find addSubview:_findText]; CGRect frm = find.frame; int height = frm.size.height + _findText.frame.size.height + 100; // note how even 100 has no effect. [find setFrame:CGRectMake(frm.origin.x, frm.origin.y, frm.size.width, height)]; [find setNeedsLayout]; [find show]; [find release]; [find setMessage:@"n"]; // Create Alert UIAlertView* av = [UIAlertView new]; av.title = @"Find"; // Add Buttons [av addButtonWithTitle:@"Cancel"]; [av addButtonWithTitle:@"Find & Bring"]; [av addButtonWithTitle:@"Find & Go"]; [av addButtonWithTitle:@"Go to Next"]; // Make Space for Text View av.message = @"n"; // Have Alert View create its view heirarchy, set its frame and begin bounce animation [av show]; // Adjust the frame CGRect frame = av.frame; frame.origin.y -= 100.0f; av.frame = frame; // Add Text Field UITextField* text = [[UITextField alloc] initWithFrame:CGRectMake(20.0, 45.0, 245.0, 25.0)]; text.borderStyle = UITextBorderStyleRoundedRect; [av addSubview:text]; [text becomeFirstResponder]; UIAlertView *insertScore = [UIAlertView new]; [insertScore setDelegate:self]; [insertScore setTitle:@"New Title!"]; [insertScore addButtonWithTitle:@"Cancel"]; [insertScore addButtonWithTitle:@"Ok"]; insertScore.message = @"n"; [insertScore addTextFieldWithValue:@"Input" label:@"player"]; [[insertScore textField] setDelegate:self]; [insertScore show]; [insertScore release]; - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { NSLog(@"%@",[[alertView textField] text]); } UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"UIAlertView" message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert addTextFieldWithValue:@"" label:@"Text Field"]; [alert setNumberOfRows:3]; @interface UIAlertView () - (void) addTextFieldWithValue: (NSString*) val label: (NSString*) label; - (UITextField*) textField; @end // extend the UIAlertView class to remove the warning caused // by calling setNumberOfRows. @interface UIAlertView (extended) - (void) setNumberOfRows:(int)num; @end [myAlert setNumberOfRows:2];