I’ve an issue in coping with RTL language (Arabic) in SwiftUI with Listing and Searchable movement, additionally when lengthy pressed on the search bar to immediate the choices menu it’s also flipped.
Examine the screenshots beneath:
I added the surroundings parameter to assist proper to left format path for the listing, however after I clicks on the search bar to do the search movement the listing is flipped once more,
Thanks upfront.
var physique: some View {
NavigationStack {
Listing {
Part {
Textual content("مرØبا")
}
}
.surroundings(.layoutDirection, .rightToLeft)
.flipsForRightToLeftLayoutDirection(true)
.navigationTitle(" جديد")
.toolbar(content material: {
Button("اغلاق") {
self.dismiss()
}
})
}
.tint(Shade.blue)
.searchable(textual content: self.$searchText, placement: .navigationBarDrawer(displayMode: .at all times))
.interactiveDismissDisabled()
}