usually i control RTL and LTR using .environment(\.layoutDirection, .leftToRight)
but for UIViews i need to make the view LTR then take snapshot then make it RTL and take another snapshot at the same test
however it feels impossible, i tried
UIView.appearance().semanticContentAttribute = .forceRightToLeft
and tried also recursively apply semanticContentAttribute to all it's subviews but it what only make it work is test plan config for Application Language, i need another way to successfully do it same as SwiftUI views .environment(\.layoutDirection, .leftToRight)
usually i control RTL and LTR using
.environment(\.layoutDirection, .leftToRight)
but for UIViews i need to make the view LTR then take snapshot then make it RTL and take another snapshot at the same test however it feels impossible, i triedUIView.appearance().semanticContentAttribute = .forceRightToLeft
and tried also recursively applysemanticContentAttribute
to all it's subviews but it what only make it work is test plan config for Application Language, i need another way to successfully do it same as SwiftUI views.environment(\.layoutDirection, .leftToRight)
i am using:
Please advise