Hey,
Could you please elaborate more on the problem you’re facing? Are you able to share any sample code? What are the results you are expecting?
Nathan
Post
Replies
Boosts
Views
Activity
I’ve encountered this bug. I suspect it’s caused when the UIHostingController’s view is transformed from the presentation, messing up hit testing of controls.
I was able to find a workaround. The view’s frame needs to be “reset”, and then the SwiftUI views will fix themselves.
Upon dismissal, the UIHostingControllers view frame should be reset like this.
let frame = view.frame
view.frame = .zero
view.frame = frame
There are a few different ways you could achieve this, such as swizzling or getting the view controller from the current UIWindow.
Assistive technologies, such as VoiceOver, use speech synthesizers that are tuned for specific language code. In SwiftUI, the language code is derived from the locale of the views environment. But default the locale will be whatever the user has set in their settings.
So if you are displaying Hebrew in an English localized app, you'll probably need to set the locale to Hebrew on the view.
Text("שלום").environment(\.locale, Locale(identifier: "he_IL"))
Note that you dont need the accessibilityLabel modifier, the label will be the text contents by default.