Closed duxinfeng closed 1 year ago
Same case whit me on my project, Hopefully it will be fixed soon, there are a lot of crashes online
I found that this comes from iOS seemingly having a problem with NSProxy. That's being used to have a stand-in for a custom text attachment view that might be not created yet. It can also be worked around by omitting such a proxy for all text attachments.
Anybody have a custom view that implements accessibility?
So for the time being - until we know better - I've just replaced the NSProxy with NSObject. With that the crash doesn't occur.
Thank you for your answer. Replacing NSObject with NSProxy solved the problem of my project crashing
I'm very sorry, after replacing NSProxy with NSObject, Custom Objects will crash. In the DTCoreText demo, Custom Objects has this problem.
In that case we'll have to change the logic for voice over for custom objects. Instead of having a proxy forwarding calls, we'll have to return the custom views themselves.
In that case we'll have to change the logic for voice over for custom objects. Instead of having a proxy forwarding calls, we'll have to return the custom views themselves.
Thank you for your answer. I have removed the DTAttributedTextContentView Accessibility related event and resolved my issue first.
Isn't that what custom views can't use?
On iOS 15 and 14, setting
view.isAccessibilityElement = NO;
can resolve the issue. However, on iOS 16 crashes still occur.When I tried running the DTCoreText Demo, using VoiceOver and tapping on the first READE ME example also caused crashes.