我有一个 UITextView,我想通过按钮的点击事件将文本粘贴到那个 UITextView 中。
您知道,当我单击一个按钮时,从任何地方复制的文本都会粘贴到该 UITextView 中。
我该怎么做?
提前致谢。
最佳答案
-(IBAction)buttonPressed:(id)sender
{
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
MsgtextView.text = [NSString stringWithFormat:@"%@ %@",MsgtextView.text,pasteboard.string;
}
检查这个
关于ios - 如何将文本粘贴到 iOS 中的 UITextView 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11327913/