开发者

iPhone Copy/Paste

I want two buttons in the app in a c开发者_JAVA百科ertain view, Copy and Paste. This view also has a textview. If someone presses the copy button, I want all of the text in that textview to be copied. If someone presses the past button, I want to append the text in the textview with that which is in the clipboard? How do I?


-(IBAction)copy {
    pasteboard = [textField text];
}

-(IBAction)paste {
    [textField setText:[[textField text] stringByAppendingString:pasteboard] ];
}

where pasteboard is a NSString


Use UIPasteBoard

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜