News for hackers. Stuff that matters.
Re:On Apple's Piss-Poor Documentation by wlesieutre on Tuesday November 10, 2020 @11:18AM (#25047641)
Excellent, thanks for this!

Most recent post is "Attributed Strings with SwiftUI" which is something I was wondering about. There's plaintext TextEditor view, but for rich text editing the impression I've gotten is to either fall back to something in UIKit or do it in a WebView. Will check this post out tonight, it might not change anything but I'd at least like a better idea where things stand in SwiftUI.

Props to Apple on this one, TextEditor has a real docs page. But it's only for plain text, sadly: https://developer.apple.com/documentation/swiftui/texteditor

Re:On Apple's Piss-Poor Documentation by terhechte on Tuesday November 10, 2020 @12:53PM (#25048791)
Yeah, for rich text you need to wrap a UITextView, there's currently no other way to do that. Also, if you have a large amount of text, TextEditor won't cut it either.

Even displaying rich text (non editable) is a wee bit tricky and severely under documented.

Re:On Apple's Piss-Poor Documentation by lukeh on Tuesday November 10, 2020 @08:24PM (#25054518)
Yeah, the sizing thing is a bit of a pain as the creates visible content fitting artefacts when contained in a list or stack.
Re:On Apple's Piss-Poor Documentation by jamil7 on Wednesday November 11, 2020 @02:14AM (#25056188)
For a small app I recently just wrapped SlateJS in a webview and passed json back and forth. Slate is pretty nice but it would be nice to use a native solution.