Getting NSRange from Subclassed UIPasteboard Selection

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.

Answers


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.


Need Your Help

AFNetworking file upload

ios iphone xcode

I'm trying to upload file with AFNetworking and it is working with iOS Simulator but not working Real devices, i tried 2 different way but same.

Accept product feed into magento via api (XML)

php xml magento

Is it possible to receive a product feed via external api? I've looked at the magento api and I can see how to produce an XML web service to feed products out, but I need to feed information into m...