Saturday, July 13, 2024
HomeiOS Developmentios - RTL movement in SwiftUI

ios – RTL movement in SwiftUI


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:

First screenshot

Second screenshot

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()
    }



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments