uipasteboard

Copy and Paste on iPhone with multiple data representations

I encountered some issues when trying to put more than one data representation onto the pasteboard on iPhone 3.0. What I'm trying to do is put a data representation and a string representation onto the pasteboard. The data is my own data type and I use it for copy and paste in my application. The string representation is a way to copy a...

Would the general iPhone pasteboard ever contain more than one item?

Would pasteboard.numberOfItems (in the code below) ever be greater than 1? How would the user cause this to happen? UIPasteboard *pasteBoard = [UIPasteboard generalPasteboard]; pasteBoard.numberOfItems Note that I'm not asking if a single pasteboard item can have more than one representation type. That they can is clear. Update: I ...

Is it possible to be notified when something is written to generalPasteboard?

I'm interested in responding to when the user performs a standard Copy to the generalPasteboard as part of the default UIWebView control. I'd like to take some action in response to this. Is this possible, or would I need to re-implement a custom copy control so that I can be sure to capture the event? ...

UIPasteboard - cannot copy text

This code should copy the string to the generalPasteboard, as the [[UIPasteboard generalPasteboard] string] object, but the method causes the program to terminate. - (void)copyResultToPasteboard { NSString *message = self.resultTextView.text; [UIPasteboard generalPasteboard].string = message; [message release]; } I think i...

Programmatically pasting into an iPhone UITextView

I have an iPhone app with a UITextView. I'd like to be able to paste the clipboard contents into it without showing the UIMenuController. I tried calling the paste: method on the UITextView, and on the first responder, but neither of those things worked. I was able to implement this by writing a bunch of code to read text from the clip...

Determine font(s) used in uipasteboard text on the iPhone.

Here is the scenerio: The user copies random text with mixed fonts. How do I determine the font(s) used? When the text is pasted from the UIPasteboard into a textview it correctly shows the mixed fonts, so I believe the information is available. UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; textView.text = pasteboard.stri...

UIPasteboard Puzzle

When using the code [[UIPasteboard generalPasteboard] setString:@"mung"]; NSLog(@"%@", [UIPasteboard generalPasteboard].string); the console reports the new value of the string, but typing command-V in another application shows the previous pasteboard contents (which may be nothing). Is there a reliable way to save a single string fo...

How can force copy selected text ? [iPhone]

Hi~ I have one question. ^^ How can i get "selected text" on UIWebView (or UITextView) ? I'd like to copy "selected text" without copy/paste popup-view. 1) i removed ... copy/paste view. ( it was success~ ) UIMenuController *theMenu = [UIMenuController sharedMenuController]; [theMenu setMenuVisible:NO]; [theMenu update]; 2. forced ...

copy HTML to UIPasteboard

Hi, I want to transfer HTML from my app to the iPhone mail application. I already have the HTML text - lest say span style='color:red'>Test/span> I can place this to UIPasteBoard - but when I paste it to mail I get the html source. When I place the same string in a HTMLView - select it there and copy it it pastes as red text in mail. ...

Getting NSRange from Subclassed UIPasteboard Selection

Hi Everyone: I am wondering if there is some way to subclass UIPasteboard in order to get the selection behavior, but not get the "Cut, Copy, and Paste" options. In addition to this, is there some notification I can subscribe to that returns the NSRange of the selected body of text once it is selected? Thanks for any help! EDIT: I wo...

iPhone generalPasteboard loses contents if application is closed by an -openURL: call

I have a method, that puts something on the pasteboard. This method is called one of two ways, one, as an IBAction from a button, the other from another method which afterwards closes the application by doing: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:"]]; The problem arises only when the application is not...

Easy way to copy multiline text to the clipboard?

How hard is it to do? I have a text with about 600 characters, multiple lines. Now I want to copy that text to the clipboard using the UIPasteboard classes. What would I need to implement? ...

get copied data from UIpasteboard

hi, i have copied image from UIwebView using clipboard and i want to mail it.For this,I use general pasteboard to get data,but there is a problem in retrieving data.When i check the pasteboard current data,it says the it has Apple Web Archive pasteboard type data,how to read this.here is my code of retriving text. UIPasteboard* pasteboa...

Need help with UIPasteBoard

Hi, I have an action that copies a string. I would like to paste this copied string out of my app. I want to access the copied data via other apps. How can I do that? ...

Adding Multiple Items of Same Relationship to UIPasteBoard

I figured out how to add/retrieve single strings to the UIPasteBoard, but I am confused on setting up the NSArray and adding/getting separate strings of the same relationship. Any help would be appreciated. ...

UIPasteboard size

I am trying to do an upgrade path for a lite to full version of an application, that can store an indefinite amount of data (I dont want to do in app purchase). I would like to be able to upgrade using a custom url without needing an online presence to cache the data to. So was thinking of using a UIPasteboard object. Does anyone k...

Tap once to copy UITextView text substring

Say you've got a UITextView populated with a chunk of text. When a user taps on a word within the text I want the app to copy (retrieve the string) that word immediately. In your knowledge, is there any practical way to do this? Side note: I looked at UIPasteboard and all that but it is NOT what I'm looking for as it does not offer a o...