开发者

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.


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜