views:

96

answers:

1

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.string;

Any Help would be much appreciated!

A: 

instead of calling [pb string], you may want to use [pb dataForPasteboardType:@"public.rtf"].

domenico
That doesn't seem to do what I want. I don't know where the user is pasting from. Have you used dataForPasteboardType before? Do you have a sample code? thanks for any help.
StickMan