我使用textinput創建UIAlertView,但我清除了背景並給出了顯示黑色邊框的邊框顏色。UIAlertView UITextField顯示黑色邊框
UIAlertView *alerttorename=[[UIAlertView alloc]initWithTitle:@"Dropbox Export" message:@"Export As:" delegate:projectDetailsReference cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
alerttorename.alertViewStyle = UIAlertViewStylePlainTextInput;
[[alerttorename textFieldAtIndex:0] setText:[appDelegate.projectName stringByDeletingPathExtension]];
UITextField *textField = [alerttorename textFieldAtIndex:0];
[textField setBackgroundColor:[UIColor clearColor]];
textField.borderStyle=UITextBorderStyleRoundedRect ;
textField.layer.borderColor=[[UIColor lightGrayColor]CGColor];
textField.layer.borderWidth = 0.1f;
textField.layer.cornerRadius = 5;
textField.clipsToBounds = YES;
alerttorename.tag=233;
[alerttorename show];
'UIAlertView中' 被棄用iOS8上,更好的用戶UIAlertController'..請參閱我的回答..! ! – itsji10dra 2015-04-01 06:51:45