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 show开发者_开发知识库s the mixed fonts, so I believe the information is available.UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
textView.text = pasteboard.string;
Any Help would be much appreciated!
instead of calling [pb string], you may want to use [pb dataForPasteboardType:@"public.rtf"].
It might be "public.html" instead of "public.rtf". You should be able to iterate over the types available to see what the other app is putting into the pasteboard, then react accordingly.
精彩评论