点击 UIButton 后,我将显示带有多行消息的 UIAlertView,以及如何让用户复制/选择该消息。
最佳答案
您是否尝试在 UIAlertView
中添加 UITextView
?
试试这个:
UIAlertView *testAlert = [[UIAlertView alloc] initWithTitle:@"Hello World ! This is just a test."
message:@""
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Done", nil];
UITextView *textView = [UITextView new];
textView.text = @"Hello World ! Hello World ! Hello World ! Hello World ! Hello World !";
textView.editable = NO;
textView.userInteractionEnabled = YES;
[testAlert setValue: textView forKey:@"accessoryView"];
[testAlert show];
关于ios - 如何让用户复制 UIAlertView 的描述?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42270053/