Replies: 1 comment
-
Hi @emphimy RTK is using the layout manager, but I haven't seen this warning before. Perhaps it's something new in iOS 18? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am encountering a warning when navigating to a view that uses RichTextKit. Could you clarify if this is an internal issue with the library or something related to my code?
UITextView 0x11ab07000 is switching to TextKit 1 compatibility mode because its layoutManager was accessed. Break on void _UITextViewEnablingCompatibilityMode(UITextView *__strong, BOOL) to debug.
I am trying to generate content dynamically into the editor, but the editor always appears blank and fails to render the streaming data.
`
private var editor: some View {
RichTextEditor(
text: $rtContext.text,
context: rtContext.context
) { editor in
if let textView = editor as? UITextView {
logger.debug("Starting UITextView configuration")
Current streaming implementation
`.task {
guard let stream = generationStream else { return }
await MainActor.run {
isGenerating = true
let initialAttributes: [NSAttributedString.Key: Any] = [
.font: UIFont.preferredFont(forTextStyle: .body),
.foregroundColor: UIColor.label,
.paragraphStyle: {
let style = NSMutableParagraphStyle()
style.lineSpacing = 8
return style
}()
]
let initialString = NSAttributedString(string: "", attributes: initialAttributes)
rtContext.text = initialString
}
}`
Beta Was this translation helpful? Give feedback.
All reactions