ios - Pasteboard - copying (image + text) creates mystery \n line break -
when add image , string pasteboard mysterious line break @ start of text?
nsmutabledictionary *photo = [nsmutabledictionary dictionary]; nsmutabledictionary *text = [nsmutabledictionary dictionary]; nsdata* imagedata = uiimagepngrepresentation(theimage.image); [photo setvalue:imagedata forkey:(nsstring*)kuttypepng]; [text setvalue:thetext.text forkey:(nsstring *)kuttypeutf8plaintext]; [[uipasteboard generalpasteboard] setitems:[nsarray arraywithobjects:photo, text, nil]];
it puts photo @ top , puts line break , text. if try send image , text in imessage image separates anyways , end text in bubble silly looking line-break infront of it.
if copy text without photo not add mysterious line-break.
[[uipasteboard generalpasteboard] setitems:[nsarray arraywithobjects:text, nil]];
does know how fix this?
if not, can think of nice workaround? there unicode characters reverse line-break? etc?
store png base64 encode. see if helps.
Comments
Post a Comment