views:

134

answers:

1

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 would like to use this subclass to allow the user to indicate the area that they would like to run a function on.

A: 

There are two notifications supported by UIPasteboard:

  • UIPasteboardChangedNotification
  • UIPasteboardRemovedNotification

I've looked through the relevant docs and not seen any way to get a range of the selection.

It's possible that future OS versions might give a little more support in this area.

Tyler
Hi Tyler: Assuming that UIPasteboard can't accomplish what I want, how would you suggest implementing the feature?
PF1
I don't know an easy way to allow for easy selectability of text. You could write one yourself, but that's no fun for many reasons. Sorry I can't be more helpful.
Tyler