sf symbols right to left

Hi, I've been trying for an hour to turn the symbols in sf symbols from left to right to right to left, I'd appreciate some help

Replies

Hi, you can use the environment modifier with the argument layouDirection and value rightToLeft like this: .environment(.layoutDirection, .rightToLeft)

VStack {
            Image(systemName: "chart.bar.doc.horizontal.fill")
                .imageScale(.large)
                .foregroundColor(.mint)
            
            //  right to left sfsymbol
            Image(systemName: "chart.bar.doc.horizontal.fill")
                .imageScale(.large)
                .foregroundColor(.mint)
                .environment(\.layoutDirection, .rightToLeft)
        }

for more information
https://developer.apple.com/videos/play/wwdc2022/10107/

  • But some of the symbols also have an option in other languages ​​such as Arabic and Hebrew

Add a Comment