Package apple.uikit.protocol
Interface NSTextAttachmentContainer
-
- All Known Implementing Classes:
NSTextAttachment
public interface NSTextAttachmentContainerThis protocol defines the interface to attachment objects from NSLayoutManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CGRectattachmentBoundsForTextContainerProposedLineFragmentGlyphPositionCharacterIndex(NSTextContainer textContainer, CGRect lineFrag, CGPoint position, long charIndex)Returns the layout bounds to the layout manager.UIImageimageForBoundsTextContainerCharacterIndex(CGRect imageBounds, NSTextContainer textContainer, long charIndex)Returns the image object rendered by NSLayoutManager at imageBounds inside textContainer.
-
-
-
Method Detail
-
attachmentBoundsForTextContainerProposedLineFragmentGlyphPositionCharacterIndex
CGRect attachmentBoundsForTextContainerProposedLineFragmentGlyphPositionCharacterIndex(NSTextContainer textContainer, CGRect lineFrag, CGPoint position, long charIndex)
Returns the layout bounds to the layout manager. The bounds origin is interpreted to match position inside lineFrag. The NSTextAttachment implementation returns -bounds if not CGRectZero; otherwise, it derives the bounds value from -[image size]. Conforming objects can implement more sophisticated logic for negotiating the frame size based on the available container space and proposed line fragment rect.
-
imageForBoundsTextContainerCharacterIndex
UIImage imageForBoundsTextContainerCharacterIndex(CGRect imageBounds, NSTextContainer textContainer, long charIndex)
Returns the image object rendered by NSLayoutManager at imageBounds inside textContainer. It should return an image appropriate for the target rendering context derived by arguments to this method. The NSTextAttachment implementation returns -image when non-nil. If -image==nil, it returns an image based on -contents and -fileType properties.
-
-