Core Text and copy 'n paste on iOS

2020-03-07 08:36发布

问题:

Is it possible in iOS to render complex text with CoreText and have copy 'n paste feature? I’ve found a lot of example about CoreText rendering but nothing that concerns copy 'n paste.

回答1:

Yes, but you have to implement Copy & Paste yourself through use of UIMenuController. There is no 'built in' support in CoreText for Copy & Paste, as CoreText is a very low level library.



回答2:

RyanR is correct, there's no built in support in CoreText for Copy & Paste, but you can make your own copy & paste.

Take a look at this other topic post.

Core Text - select text in iPhone?