Iphone UIAlertView自定义,如何管理标准按钮?

Iphone UIAlertView自定义,如何管理标准按钮?,iphone,button,uitextfield,uitextview,uialertview,Iphone,Button,Uitextfield,Uitextview,Uialertview,我自定义UIAlertView并添加UITextView和UITextfield,但我需要将按钮(我在标准init中添加按钮)设置到UIAlertView视图的底部。当initmyUIAlertView时,我添加消息:@“\n\n\n\n”这会给我5个字符串,但当我添加另一个UIAlertView时,会显示它的标准文本视图。 看一看图片,让它更清楚地了解我有什么和我需要什么。 用这个例子 // Create Alert UIAlertView* av = [UIAlertView ne

我自定义
UIAlertView
并添加
UITextView
UITextfield
,但我需要将按钮(我在标准
init
中添加按钮)设置到
UIAlertView
视图的底部。当
init
my
UIAlertView
时,我添加消息:
@“\n\n\n\n”
这会给我5个字符串,但当我添加另一个
UIAlertView
时,会显示它的标准文本视图。 看一看图片,让它更清楚地了解我有什么和我需要什么。

用这个例子

 // 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];

我想你应该检查一下你的控制器的自动大小:)嘿,你能告诉我你到底想做什么吗。考虑到空间限制,我认为modalViewController在您的情况下可以更好地工作。请提供更多详细信息以帮助更好地理解问题。您的问题是文本字段在按钮下面,而您不希望发生这种情况吗?