Questions tagged [nstextattachment]

NSTextAttachment class is used for embedding images into attributed strings(NSAttributedString). Supported by iOS 7.0+, masOS 10.10+, tvOS 9.0+ and watchOS 2.0+

NSTextAttachmentobjects contain either anNSData object or anFileWrapper object, which in turn holds the contents of the attached file.

Docs: NSTextAttachment reference

141 questions
0
votes
1 answer

export image from attributed text in Swift

I have an attributed text which contains an NSTextAttachment which I insert earlier. Now I need to extract that image and any text to individual variables to save them separately. But I get an error which provides me with no more information other…
snksnk
  • 1,566
  • 4
  • 21
  • 46
0
votes
1 answer

Showing Clickable URLs and icon in UILabel

I am using TTTAttributedLabel for URLs and phone number in my app. Every thing is working fine but the problem is that now I need to show icon in the UILabel. Before I am using given below code. But due to use of TTTAttributedLabel now…
Iqbal Khan
  • 4,587
  • 8
  • 44
  • 83
0
votes
1 answer

NSAttributeString Height seems align wrong when use both image and text

I have a uilabel in tableviewcell ,and the label use NSAttributeString to support both image and text. But I found when the label contains image or text only , the height of label is correct ,but when label contains image and text both ,the height…
ximmyxiao
  • 2,622
  • 3
  • 20
  • 35
0
votes
1 answer

ios7 custom interaction with nstextattachment in uilabel

I have an NSTextAttachment with an image in a UILabel and I would like to perform a custom behaviour when clicking on this attachment. UITextViewDelegate provides an handy method textView:shouldInteractWithTextAttachment:inRange: But it can only be…
ram
  • 21
  • 4
0
votes
1 answer

ASP VBScript code gives "800a0005 Runtime error Invalid Procedure Call"

The ASP code getting the below error while writing text to file. Microsoft VBScript runtime error '800a0005' Invalid Procedure call or argument The Line in which i get the above error is below, oFile.Write Chr(AscB(MidB(FileData,nIndex,1))) The…
Sarath Kumar
  • 1
  • 1
  • 2
-1
votes
1 answer

Inserting multiple images in UILabel

I know how to insert a UIImage inside a UILabel but I am not sure how insert more than one image as appending the new image to the attributed string will always discard the previous attached image. Is there a way to insert multiple images or maybe…
Tarek
  • 783
  • 10
  • 31
1 2 3
9
10