robb on Nostr: Using the new TextRenderer protocol in iOS 18 & co, you hook into the drawing of ...
Using the new TextRenderer protocol in iOS 18 & co, you hook into the drawing of #SwiftUI Text and access layout information of all lines, runs & glyphs. And with the new TextAttribute API, you can pass data from individual Text ranges to your renderer.
https://developer.apple.com/documentation/SwiftUI/TextRenderer Published at
2024-06-10 21:07:34Event JSON
{
"id": "0aeff7a6034bb4c4b4501094f7e422e6962003315430b098ab40439b10b42388",
"pubkey": "cfd573f9c485b2db13943e1bf9a19bb8bd56a746b60517810d10f838aedacf56",
"created_at": 1718053654,
"kind": 1,
"tags": [
[
"t",
"swiftui"
],
[
"proxy",
"https://mastodon.social/users/dlx/statuses/112594364269853895",
"activitypub"
]
],
"content": "Using the new TextRenderer protocol in iOS 18 \u0026 co, you hook into the drawing of #SwiftUI Text and access layout information of all lines, runs \u0026 glyphs. And with the new TextAttribute API, you can pass data from individual Text ranges to your renderer. https://developer.apple.com/documentation/SwiftUI/TextRenderer\n\nhttps://files.mastodon.social/media_attachments/files/112/594/361/363/803/032/original/42fc3bc2905c71e6.png",
"sig": "b08b9b2569fd1046093f95d8f5ee345721669710ac3e8121c26709f969408824f046cfe59e61c196fa8dc8089b733c73e5a9fb78a9a0f17483325f90d9905741"
}