I have successfully used NSTextAttachmentin UITextViewfor some time, but only ever used a property image, for example:
NSTextAttachment
UITextView
image
NSTextAttachment *attachment = [[NSTextAttachment alloc] initWithData:nil ofType:nil]; attachment.image = [UIImage imageNamed:@"someImage"];
I am interested in trying to use initWithData:ofType:, however, I cannot find documentation describing which type the NSDataclass NSTextAttachmentthat can be mapped to supports UITextView.
initWithData:ofType:
NSData
For example, can I transfer data NSStringor some UIView? Or even a PDF? Or is it limited by actual data UIImage?
NSString
UIView
UIImage
, , ( , , RTF). . , PDF Mail, , , pdf UIImage, pdf . Mail. , , , UITextView , : , , , .
Source: https://habr.com/ru/post/1568219/More articles:ColdFusion ReReplace reformat phone number - stringSelecting local files using watir-webdriver - ruby | fooobar.comThe best way to return a member variable of a vector to an external class is c ++Convenient shell idiom for reverse "using an alternate value" - shellHow to set and use an empty range in VBA? - vbaReceiving a nsIChannel request nsIDOMWindow always returns null on e10s - firefoxOpening encrypted emails with C # - c #Gradle cannot resolve dependencies when creating an Android Studio project - androidMeasure the code coverage of an executable shell script with kcov / shunit2 - bashLinux while loop timeout (bash single line) shell script - linuxAll Articles