2012-07-27 20 views
0

我有UITextView存在於UIAlertView中。當我選擇從UITextView中的文本,然後這些文本選擇菜單即複製,粘貼,選擇等都是躲在UIAlert觀點背後如以下的截圖:文本選擇的菜單沒有出現在UIAlertView

enter image description here

有沒有什麼辦法,使這個菜單中面前?

+0

您可以顯示代碼如何添加它嗎? – 2012-07-27 12:20:44

回答

0

你要描述的問題以及(至少你已經使用的代碼)

任何方式這下面的代碼工作對我很

UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle: @"Select the Text" message:@"     " delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Cancel", nil];     

UITextField *myTextField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 65.0, 260.0, 25.0)]; 
[myTextField setBackgroundColor:[UIColor whiteColor]]; 
myTextField.text = @"This is the Data string"; 
[myTextField becomeFirstResponder]; 
[myAlertView addSubview:myTextField]; 

[myTextField release]; 
myTextField = nil; 

[myAlertView show]; 
[myAlertView release]; 
myAlertView = nil; 

注意:校準幀根據您的要求