A set of optional methods implemented by delegates of NSLayout
objects.
SDKs
- iOS 7.0+
- macOS 10.6+
- Mac Catalyst 13.0+
- tvOS 9.0+
Frameworks
- UIKit
- App
Kit
Declaration
protocol NSLayoutManagerDelegate
A set of optional methods implemented by delegates of NSLayout
objects.
SDKs
Frameworks
protocol NSLayoutManagerDelegate
func layout Manager Did Invalidate Layout(NSLayout Manager)
Informs the delegate that the given layout manager has invalidated layout information (not glyph information).
func layout Manager(NSLayout Manager, should Generate Glyphs: Unsafe Pointer<CGGlyph>, properties: Unsafe Pointer<NSLayout Manager .Glyph Property>, character Indexes: Unsafe Pointer<Int>, font: UIFont, for Glyph Range: NSRange) -> Int
Enables customizing the initial glyph generation process.
func layout Manager(NSLayout Manager, should Use: NSLayout Manager .Control Character Action, for Control Character At: Int) -> NSLayout Manager .Control Character Action
Returns the control character action for the control character at the given character index.
func layout Manager(NSLayout Manager, did Complete Layout For: NSText Container?, at End: Bool)
Informs the delegate that the given layout manager has finished laying out text in the given text container.
func layout Manager(NSLayout Manager, text Container: NSText Container, did Change Geometry From: CGSize)
Sent right before the layout manager invalidates layout due to the text container changing geometry.
func layout Manager(NSLayout Manager, should Break Line By Hyphenating Before Character At: Int) -> Bool
Sent while determining the hyphenation point.
func layout Manager(NSLayout Manager, should Break Line By Word Before Character At: Int) -> Bool
Sent while determining the soft line break point.
func layout Manager(NSLayout Manager, line Spacing After Glyph At: Int, with Proposed Line Fragment Rect: CGRect) -> CGFloat
Returns the spacing after the line ending with the given glyph index.
func layout Manager(NSLayout Manager, paragraph Spacing After Glyph At: Int, with Proposed Line Fragment Rect: CGRect) -> CGFloat
Returns the paragraph spacing after the line ending with the given glyph index.
func layout Manager(NSLayout Manager, paragraph Spacing Before Glyph At: Int, with Proposed Line Fragment Rect: CGRect) -> CGFloat
Returns the paragraph spacing before the line starting with the given glyph index.
func layout Manager(NSLayout Manager, bounding Box For Control Glyph At: Int, for: NSText Container, proposed Line Fragment: CGRect, glyph Position: CGPoint, character Index: Int) -> CGRect
Returns the bounding rectangle for the specified control glyph with the specified parameters.
func layout Manager(NSLayout Manager, should Set Line Fragment Rect: Unsafe Mutable Pointer<CGRect>, line Fragment Used Rect: Unsafe Mutable Pointer<CGRect>, baseline Offset: Unsafe Mutable Pointer<CGFloat>, in: NSText Container, for Glyph Range: NSRange) -> Bool
Customizes the line fragment geometry before committing it to the layout cache.
func layout Manager(NSLayout Manager, should Use Temporary Attributes: [NSAttributed String .Key : Any], for Drawing To Screen: Bool, at Character Index: Int, effective Range: NSRange Pointer?) -> [NSAttributed String .Key : Any]?
Sent when the layout manager is drawing and needs to decide whether or not to use temporary attributes.
class NSLayout Manager
An object that coordinates the layout and display of characters held in an NSText
object.
protocol NSText Layout Orientation Provider
A set of methods that define the orientation of text for an object.