iOS API Reference (DocC)
The full Swift API reference is generated by DocC from the source code documentation.
Generate Locally
sh
cd ios
swift package generate-documentation --output-path docs
open docs/index.htmlBrowse in Xcode
- Open
ios/Package.swiftin Xcode - Product → Build Documentation (⌃⇧⌘D)
- Navigate to "Pretext" in the documentation sidebar
Quick Reference
| Function | Description |
|---|---|
Pretext.prepare(_:font:options:) | One-time text analysis + measurement |
Pretext.layout(_:maxWidth:lineHeight:) | Pure-arithmetic height computation |
Pretext.prepareWithSegments(_:font:options:) | Rich variant with segment data |
Pretext.layoutWithLines(_:maxWidth:lineHeight:) | All lines with text + width |
Pretext.walkLineRanges(_:maxWidth:onLine:) | Line widths without text strings |
Pretext.layoutNextLine(_:start:maxWidth:) | Variable-width line iterator |
Pretext.clearCache() | Reset measurement caches |
Pretext.setLocale(_:) | Change word segmenter locale |