UIAlertView с двумя текстовыми полями и двумя кнопками
Problem - Я хочу UIAlertView, который содержит заголовок, два текстовых поля с заполнителями и две кнопки. What I have done till now - Я использовал этот код, я получаю точный UIAlertView со всем этим, что я упомянул, но когда представление загружается, кажется, что сначала появляется внизу, а затем входит в середину представления.
<code> -(void)showalert{ disclaimerAgreedAlertView = [[UIAlertView alloc] initWithTitle:@" " message:@" " delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Login", nil]; userNameTextField = [[UITextField alloc] initWithFrame:CGRectMake(20.0, 15.0, 245.0, 25.0)]; userNameTextField.delegate=self; [userNameTextField setBackgroundColor:[UIColor whiteColor]]; [userNameTextField setKeyboardType:UIKeyboardTypeDefault]; userNameTextField.placeholder=@"Username"; userNameTextField.secureTextEntry=NO; [disclaimerAgreedAlertView addSubview:userNameTextField]; passwordTextField = [[UITextField alloc] initWithFrame:CGRectMake(20.0, 45.0, 245.0, 25.0)]; passwordTextField.delegate=self; [passwordTextField setBackgroundColor:[UIColor whiteColor]]; [passwordTextField setKeyboardType:UIKeyboardTypeDefault]; passwordTextField.placeholder=@"Password"; passwordTextField.secureTextEntry=YES; [disclaimerAgreedAlertView addSubview:passwordTextField]; disclaimerAgreedAlertView.tag=99; [disclaimerAgreedAlertView show]; disclaimerAgreedAlertView.frame= CGRectMake(5, 400, 320, 160); } </code>
Then I tried some of the non documented api's which are giving me the result I want but I am afraid that it may cause rejection of my app.
Итак, какие-либо решения для этого?