One Logo Pool Ball
UIKit · IOS API REFERENCE

NSTextLayoutManager

class · iOS 15.0+ · SDK 27.1

class NSTextLayoutManager

Members (39)

get · iOS 15.0+

linkRenderingAttributes

TypeScript
static get linkRenderingAttributes(): NativeMap<_Foundation_NSAttributedString_Key, unknown>
Swift declaration
class var linkRenderingAttributes: [NSAttributedString.Key : Any] { get }
method · iOS 15.0+

addRenderingAttribute

TypeScript
addRenderingAttribute(renderingAttribute: _Foundation_NSAttributedString_Key, value: (unknown) | null, textRange: NSTextRange): void
Swift declaration
func addRenderingAttribute(_ renderingAttribute: NSAttributedString.Key, value: Any?, for textRange: NSTextRange)
method · iOS 15.0+

ensureLayout

TypeScript
ensureLayoutFor(bounds: { x: number; y: number; width: number; height: number }): void
Swift declaration
func ensureLayout(for bounds: CGRect)
method · iOS 15.0+

ensureLayout

TypeScript
ensureLayoutFor24253(range: NSTextRange): void
Swift declaration
func ensureLayout(for range: NSTextRange)
init · iOS 15.0+

init

TypeScript
static init(): NSTextLayoutManager
Swift declaration
init()
init · iOS 15.0+

init

TypeScript
static initCoder(coder: _Foundation_NSCoder): (NSTextLayoutManager) | null
Swift declaration
init?(coder: NSCoder)
method · iOS 15.0+

invalidateLayout

TypeScript
invalidateLayout(range: NSTextRange): void
Swift declaration
func invalidateLayout(for range: NSTextRange)
method · iOS 15.0+

invalidateRenderingAttributes

TypeScript
invalidateRenderingAttributes(textRange: NSTextRange): void
Swift declaration
func invalidateRenderingAttributes(for textRange: NSTextRange)
method · iOS 15.0+

removeRenderingAttribute

TypeScript
removeRenderingAttribute(renderingAttribute: _Foundation_NSAttributedString_Key, textRange: NSTextRange): void
Swift declaration
func removeRenderingAttribute(_ renderingAttribute: NSAttributedString.Key, for textRange: NSTextRange)
method · iOS 15.0+

renderingAttributes

TypeScript
renderingAttributes(link: unknown, location: SDKHandle): NativeMap<_Foundation_NSAttributedString_Key, unknown>
Swift declaration
func renderingAttributes(forLink link: Any, at location: any NSTextLocation) -> [NSAttributedString.Key : Any]
method · iOS 15.0+

replaceContents

TypeScript
replaceContentsInWith(range: NSTextRange, attributedString: _Foundation_NSAttributedString): void
Swift declaration
func replaceContents(in range: NSTextRange, with attributedString: NSAttributedString)
method · iOS 15.0+

replaceContents

TypeScript
replaceContentsInWith56453(range: NSTextRange, textElements: Array<NSTextElement>): void
Swift declaration
func replaceContents(in range: NSTextRange, with textElements: [NSTextElement])
method · iOS 15.0+

replace

TypeScript
replace(textContentManager: NSTextContentManager): void
Swift declaration
func replace(_ textContentManager: NSTextContentManager)
method · iOS 15.0+

setRenderingAttributes

TypeScript
setRenderingAttributes(renderingAttributes: NativeMap<_Foundation_NSAttributedString_Key, unknown>, textRange: NSTextRange): void
Swift declaration
func setRenderingAttributes(_ renderingAttributes: [NSAttributedString.Key : Any], for textRange: NSTextRange)
method · iOS 15.0+

textLayoutFragment

TypeScript
textLayoutFragmentFor(location: SDKHandle): (NSTextLayoutFragment) | null
Swift declaration
func textLayoutFragment(for location: any NSTextLocation) -> NSTextLayoutFragment?
method · iOS 15.0+

textLayoutFragment

TypeScript
textLayoutFragmentFor47826(position: { x: number; y: number }): (NSTextLayoutFragment) | null
Swift declaration
func textLayoutFragment(for position: CGPoint) -> NSTextLayoutFragment?
get · iOS 15.0+

delegate

TypeScript
get delegate(): (SDKHandle) | null
Swift declaration
weak var delegate: (any NSTextLayoutManagerDelegate)? { get set }
set · iOS 15.0+

delegate

TypeScript
set delegate(value: (Implements<NSTextLayoutManagerDelegate> | SDKHandle) | null)
Swift declaration
weak var delegate: (any NSTextLayoutManagerDelegate)? { get set }
get · iOS 15.0+

layoutQueue

TypeScript
get layoutQueue(): (_Foundation_OperationQueue) | null
Swift declaration
var layoutQueue: OperationQueue? { get set }
set · iOS 15.0+

layoutQueue

TypeScript
set layoutQueue(value: (_Foundation_OperationQueue) | null)
Swift declaration
var layoutQueue: OperationQueue? { get set }
get · iOS 15.0+

limitsLayoutForSuspiciousContents

TypeScript
get limitsLayoutForSuspiciousContents(): boolean
Swift declaration
var limitsLayoutForSuspiciousContents: Bool { get set }
set · iOS 15.0+

limitsLayoutForSuspiciousContents

TypeScript
set limitsLayoutForSuspiciousContents(value: boolean)
Swift declaration
var limitsLayoutForSuspiciousContents: Bool { get set }
get · iOS 15.0+

renderingAttributesValidator

TypeScript
get renderingAttributesValidator(): (((arg0: NSTextLayoutManager, arg1: NSTextLayoutFragment) => Promise<void>)) | null
Swift declaration
var renderingAttributesValidator: ((NSTextLayoutManager, NSTextLayoutFragment) -> Void)? { get set }
set · iOS 15.0+

renderingAttributesValidator

TypeScript
set renderingAttributesValidator(value: (((arg0: NSTextLayoutManager, arg1: NSTextLayoutFragment) => void)) | null)
Swift declaration
var renderingAttributesValidator: ((NSTextLayoutManager, NSTextLayoutFragment) -> Void)? { get set }
get · iOS 26.0+

resolvesNaturalAlignmentWithBaseWritingDirection

TypeScript
get resolvesNaturalAlignmentWithBaseWritingDirection(): boolean
Swift declaration
var resolvesNaturalAlignmentWithBaseWritingDirection: Bool { get set }
set · iOS 26.0+

resolvesNaturalAlignmentWithBaseWritingDirection

TypeScript
set resolvesNaturalAlignmentWithBaseWritingDirection(value: boolean)
Swift declaration
var resolvesNaturalAlignmentWithBaseWritingDirection: Bool { get set }
get · iOS 15.0+

textContainer

TypeScript
get textContainer(): (NSTextContainer) | null
Swift declaration
var textContainer: NSTextContainer? { get set }
set · iOS 15.0+

textContainer

TypeScript
set textContainer(value: (NSTextContainer) | null)
Swift declaration
var textContainer: NSTextContainer? { get set }
get · iOS 15.0+

textContentManager

TypeScript
get textContentManager(): (NSTextContentManager) | null
Swift declaration
weak var textContentManager: NSTextContentManager? { get }
get · iOS 15.0+

textSelectionNavigation

TypeScript
get textSelectionNavigation(): NSTextSelectionNavigation
Swift declaration
var textSelectionNavigation: NSTextSelectionNavigation { get set }
set · iOS 15.0+

textSelectionNavigation

TypeScript
set textSelectionNavigation(value: NSTextSelectionNavigation)
Swift declaration
var textSelectionNavigation: NSTextSelectionNavigation { get set }
get · iOS 15.0+

textSelections

TypeScript
get textSelections(): Array<NSTextSelection>
Swift declaration
var textSelections: [NSTextSelection] { get set }
set · iOS 15.0+

textSelections

TypeScript
set textSelections(value: Array<NSTextSelection>)
Swift declaration
var textSelections: [NSTextSelection] { get set }
get · iOS 15.0+

textViewportLayoutController

TypeScript
get textViewportLayoutController(): NSTextViewportLayoutController
Swift declaration
var textViewportLayoutController: NSTextViewportLayoutController { get }
get · iOS 15.0+

usageBoundsForTextContainer

TypeScript
get usageBoundsForTextContainer(): { x: number; y: number; width: number; height: number }
Swift declaration
var usageBoundsForTextContainer: CGRect { get }
get · iOS 15.0+

usesFontLeading

TypeScript
get usesFontLeading(): boolean
Swift declaration
var usesFontLeading: Bool { get set }
set · iOS 15.0+

usesFontLeading

TypeScript
set usesFontLeading(value: boolean)
Swift declaration
var usesFontLeading: Bool { get set }
get · iOS 15.0+

usesHyphenation

TypeScript
get usesHyphenation(): boolean
Swift declaration
var usesHyphenation: Bool { get set }
set · iOS 15.0+

usesHyphenation

TypeScript
set usesHyphenation(value: boolean)
Swift declaration
var usesHyphenation: Bool { get set }

Skipped declarations

3 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

NSTextLayoutManager.enumerateTextLayoutFragments(from:options:using:)

callback cannot propagate synchronous failure

NSTextLayoutManager.enumerateRenderingAttributes(from:reverse:using:)

callback cannot propagate synchronous failure

NSTextLayoutManager.enumerateTextSegments(in:type:options:using:)

callback cannot propagate synchronous failure

All UIKit types →