0

是否可能向 UIAlertViewStyleLoginAndPasswordInput 添加更多 TextField?
我该怎么办?
还是有其他可能?

4

1 回答 1

-1

是的,你可以这样做

 UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Your title here!" message:@"this gets covered" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
UITextField *myTextField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 25.0)];
[myTextField setBackgroundColor:[UIColor whiteColor]];
[myAlertView addSubview:myTextField];
[myAlertView show];
[myAlertView release];

希望这可以帮助。

于 2012-06-06T18:34:34.447 回答