I customize UIAlertV开发者_如何学Ciew
and add UITextView
and UITextfield
, but I need to set buttons (I add buttons in a standart init
) to bottom of UIAlertView
view. While init
my UIAlertView
I add message:@"\n\n\n\n\n"
this give me 5 strings but when I add another one UIAlertView
show it's standart textview.
Take a look on image to make it more clear to understand what i have and what i need.
Use this Example ....
// 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];
精彩评论