One Logo Pool Ball
UIKit · IOS API REFERENCE

NSTextLineFragment

class · iOS 15.0+ · SDK 27.1

class NSTextLineFragment

Members (11)

method · iOS 15.0+

characterIndex

TypeScript
characterIndex(point: { x: number; y: number }): number
Swift declaration
func characterIndex(for point: CGPoint) -> Int
method · iOS 15.0+

draw

TypeScript
draw(point: { x: number; y: number }, context: _CoreGraphics_CGContext): void
Swift declaration
func draw(at point: CGPoint, in context: CGContext)
method · iOS 15.0+

fractionOfDistanceThroughGlyph

TypeScript
fractionOfDistanceThroughGlyph(point: { x: number; y: number }): number
Swift declaration
func fractionOfDistanceThroughGlyph(for point: CGPoint) -> CGFloat
init · iOS 15.0+

init

TypeScript
static initAttributedStringRange(attributedString: _Foundation_NSAttributedString, range: SDKHandle): NSTextLineFragment
Swift declaration
init(attributedString: NSAttributedString, range: NSRange)
init · iOS 15.0+

init

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

init

TypeScript
static initStringAttributesRange(string: string, attributes: NativeMap<_Foundation_NSAttributedString_Key, unknown>, range: SDKHandle): NSTextLineFragment
Swift declaration
convenience init(string: String, attributes: [NSAttributedString.Key : Any] = [:], range: NSRange)
method · iOS 15.0+

locationForCharacter

TypeScript
locationForCharacter(index: number): { x: number; y: number }
Swift declaration
func locationForCharacter(at index: Int) -> CGPoint
get · iOS 15.0+

attributedString

TypeScript
get attributedString(): _Foundation_NSAttributedString
Swift declaration
var attributedString: NSAttributedString { get }
get · iOS 15.0+

characterRange

TypeScript
get characterRange(): SDKHandle
Swift declaration
var characterRange: NSRange { get }
get · iOS 15.0+

glyphOrigin

TypeScript
get glyphOrigin(): { x: number; y: number }
Swift declaration
var glyphOrigin: CGPoint { get }
get · iOS 15.0+

typographicBounds

TypeScript
get typographicBounds(): { x: number; y: number; width: number; height: number }
Swift declaration
var typographicBounds: CGRect { get }

Skipped declarations

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

NSTextLineFragment.init()

inherited init: cannot prove legal (class declares 2 custom initializers)

All UIKit types →